MySQL Trouble shooting

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.

  •  2 Users Found This Useful
  •  
  • cpanel, india, provider, gujarat, mysql
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to backup your website in cPanel

This demo assumes you've already logged in to cPanel Now let's learn how to backup our website...

How to create a subdomain in cPanel

This demo assumes you've already logged in to cPanel Now let's learn how to create a subdomain...

How to Add, Edit and Delete Cron Jobs in cPanel

This knowledgebase post describes how to use cPanel to configure Cron Jobs for your website....

WordPress Softaculous Installation Tutorial

This tutorial explains how to use Softaculous to install a WordPress application on your site. It...

How to login to cPanel

This demo assumes you've already opened your browser, and entered your cPanel login URL Now...