Source for file pgsql.inc.php
Documentation is available at pgsql.inc.php
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
$query = "SELECT W.* FROM ". T_WORK. " W WHERE workshop_statut='P' ORDER BY workshop_range ASC, workshop_denomination ASC OFFSET 0 LIMIT ". $nb. ";";
$query = "SELECT to_char(workcal_task_date, '". toStringSqlDate(). "') AS task_date, workcal_id, workcal_task, workcal_workshop_id,
LEFT OUTER JOIN ". T_WORK. " on workcal_workshop_id=workshop_id
WHERE workcal_task_date < NOW() ORDER BY workcal_task_date DESC OFFSET 0 LIMIT ". $nb. ";";
$query = "SELECT to_char(workcal_task_date, '". toStringSqlDate(). "') AS task_date, workcal_id, workcal_task, workcal_workshop_id,
LEFT OUTER JOIN ". T_WORK. " on workcal_workshop_id=workshop_id
WHERE workcal_task_date >= NOW() ORDER BY workcal_task_date ASC OFFSET 0 LIMIT ". $nb. ";";
$query = "SELECT user_id , jwu_workshop_id FROM " . T_USER . " As U LEFT OUTER JOIN " . J_WORK_USERS . " As W ON U.user_id=W.jwu_user_id WHERE lower(user_login) = '". strtolower($login). "' AND user_password='". $pass. "' AND user_validity='Y';";
if(empty($array)) $str = '1 = 1';
$str .= $sep. 'workshop_id='. $v;
$query = "SELECT workshop_denomination, workshop_id FROM ". T_WORK . " WHERE (". $str . ") AND workshop_statut='P' ORDER BY workshop_range ASC, workshop_denomination ASC";
$query= "SELECT news_id, news_title, to_char(news_published_date, '". toStringSqlDate('long'). "') AS news_published_date_display FROM " . T_NEWS . " WHERE news_statut = 'P' ORDER BY news_range, news_published_date DESC OFFSET 0 LIMIT ". $nb. ";";
$query= "SELECT DISTINCT I.sdii_name, V.sdiv_id, I.sdii_id, V.sdiv_scale, V.sdiv_date_crea, MAX(sdiv_date_crea) AS date_c_max
FROM " . T_SDI_INFO . " as I LEFT OUTER JOIN " . T_SDI_VALUE . " as V ON I.sdii_id=V.sdiv_sdi_info
WHERE sdiv_statut='P' AND sdii_statut='P' GROUP BY I.sdii_name, I.sdii_id, V.sdiv_scale, V.sdiv_id, V.sdiv_date_crea ORDER BY date_c_max DESC;";
$query = "SELECT * FROM " . T_SD_THEME . " ORDER BY sdtheme_range, sdtheme_id;";
$query = "SELECT * FROM " . T_PRIORITY . " ORDER BY priority_id;";
if ($mask<>- 1) $mask= "OR scale_statut='I'";
$query= "SELECT * FROM " . T_SCALE . " WHERE scale_statut='P' ". $mask. " ORDER BY scale_range ASC, scale_dependencies ASC, scale_denomination ASC;";
$query = "SELECT * FROM " . T_LEVEL . " WHERE level_statut='P' ORDER BY level_range ASC, level_range DESC;";
$query = "SELECT publi_id, publi_title, publi_resume FROM " . T_PUBLI . " WHERE publi_statut = 'P' ORDER BY publi_range, publi_published_date DESC OFFSET 0 LIMIT ". $nb. ";";
$query = "SELECT news_id, news_title, news_header, news_body, ".
"to_char(news_published_date, '". toStringSqlDate(). "')) AS news_published_date_display, ".
"to_char(news_date_crea, '". toStringSqlDate(). "') AS news_date_crea_display, user_login, theme_name ".
"LEFT OUTER JOIN " . T_THEME. " ON news_theme=theme_id ".
"LEFT OUTER JOIN " . T_USER. " ON news_posted_by=user_id ".
"WHERE news_statut <> 'E' ".
"AND news_published_date <> '0001-01-01' ".
"ORDER BY news_published_date DESC OFFSET 0 LIMIT 15;";
|