Jump to content

my provider changed Mysql version and query doesn't work anymore


aleks5

Recommended Posts

HI all,

 

my provider switched to MySQL v 5.1.42 (previous verson was 4.x.x) and my simple quert doesn't work anymore. here it is:

 

$result = mysql_query("SELECT id AS page_id, page_$lang AS headline, template_id FROM pages WHERE id='$page_id'");	
$myrow = mysql_fetch_array($result);

here's the error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource

 

Connection to database works, and variables are also visible. I get same result if i change

variables into values.

 

I've contacted supper, and they say that code is not compatible with MySQL5, but they don't want to say how should i change it. I've tried to find solution in the manaul, but to me, it seems that code is ok.

 

Please help :)

borokred is the database name. Do you have a database with that name that has a table pages in it? Is the capitalization correct for both the database and the table name (in case your web host did something to cause the letter-case to become significant or different from what it previously was.)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.