I just moved hosting providers for my website and there is one page that is not working properly. The old provider had MySQL Server 5.0.51a and PHP 5 so I setup the new server with MySQL Server 5.0.51a-Community and PHP 5.
After the site move, I get the following error:
query failed:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
This is the corresponding query that is failing:
$db = new ReviewDB();
$review_query = "select * from tb_review_dvd where review_dvd = $review_dvd";
$rq_result = mysql_query( $review_query, $db->handle );
if( !$rq_result ) die ( "query failed:" . mysql_error() );
$review = mysql_fetch_array( $rq_result, MYSQL_BOTH );
I have the same issue on the site with this code (basically the same coding):
$review_query = "select * from tb_review_theatricle where review_theatricle = $review_theatricle";
$rq_result = mysql_query( $review_query, $db->handle );
if( !$rq_result ) die ( "query failed:" . mysql_error() );
$review = mysql_fetch_array( $rq_result, MYSQL_BOTH );
Any ideas what would be causing the problems since the servers are setup mostly in the same manner?
Reply With Quote