Subversion Repositories Applications.bazar

Rev

Rev 438 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 438 Rev 441
Line 1225... Line 1225...
1225
		$req_where=1;
1225
		$req_where=1;
1226
	}
1226
	}
1227
	if ($requeteSQL!='') {
1227
	if ($requeteSQL!='') {
1228
		if ($req_where==1) {$requete .= ' AND ';}
1228
		if ($req_where==1) {$requete .= ' AND ';}
1229
		$requete .= '('.$requeteSQL.')';
1229
		$requete .= '('.$requeteSQL.')';
1230
		$req_where=1;
1230
		$req_where=1; 
1231
	}
1231
	}
1232
	$requete .= 'GROUP BY bf_id_fiche ORDER BY  bf_date_debut_validite_fiche DESC, bf_date_fin_validite_fiche DESC, bf_date_maj_fiche DESC';
1232
	$requete .= ' GROUP BY bf_id_fiche ORDER BY  bf_date_debut_validite_fiche DESC, bf_date_fin_validite_fiche DESC, bf_date_maj_fiche DESC';
1233
	if ($nbitem!='') {$requete .= ' LIMIT 0,'.$nbitem;}
1233
	if ($nbitem!='') {$requete .= ' LIMIT 0,'.$nbitem;}
1234
	$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
1234
	$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
1235
	if (DB::isError($resultat)) {
1235
	if (DB::isError($resultat)) {
1236
		return  $resultat->getMessage().'<br /><br />'.$resultat->getDebugInfo() ;
1236
		return  $resultat->getMessage().'<br /><br />'.$resultat->getDebugInfo() ;
1237
	}
1237
	}