Ben bu sorgunun sonuçlarını görüntülemek için gerekir:
SELECT * FROM projects WHERE PrestaCmd LIKE '% A - CREP - DPE - %'
ancak PHP, bu sorgu çalışmıyor: s
Bu benim kodudur:
$req = "SELECT * FROM ".$table." WHERE PrestaCmd LIKE '%".$ch."%'";
echo $req; //returns : SELECT * FROM jos_projectlog_projects WHERE PrestaCmd LIKE '% A - CREP - DPE - %'
$results = mysql_query($req);
while ($row = mysql_fetch_array($results, MYSQL_ASSOC)) {
print_r($row);
}
I think the problem is coming from the '$ch' variable. But when I put an echo of the query, it's correct, and when I put a query like this :
$req = "SELECT * FROM jos_projectlog_projects WHERE PrestaCmd LIKE '% A - CREP - DPE - %'";
echo $req;
$results = mysql_query($req);
while ($row = mysql_fetch_array($results, MYSQL_ASSOC)) {
print_r($row);
}
çalışıyor: s