Try checking for Typos by printing out the query that is getting sent to MySQL Server from your code.

For example if you MySQL Code looks like:

 

$query = 'SELECT * FROM t4 WHERE f1 IN(';
for ($i = 1; $i < 101; $i ++)
$query .= "'row$i,";
$query = rtrim($query, ',');
$query .= ')';
$result = mysql_query($query);

 

Try adding echo $query; into the code like this:

$query = 'SELECT * FROM t4 WHERE f1 IN(';
for ($i = 1; $i < 101; $i ++)
$query .= "'row$i,";
$query = rtrim($query, ',');
$query .= ')';
echo $query; 

//$result = mysql_query($query);

This shold print the query that is actually getting sent to MySQL Server and you may find errors in the query.

Was this answer helpful? 0 Users Found This Useful (1 Votes)