Jump to content

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


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.)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.