Help with queries

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
esapo
-


Joined: 28 Feb 2004
Posts: 1

PostPosted: Sat Feb 28, 2004 9:07 pm    Post subject: Help with queries Reply with quote

Hi!!
I have instaled Abyss Web Sever, PHP and SQL and Mysql. Everything works fine.

I made a copy of my site to the Abyss directory and the site also works, except when some page tries to run a query. I always receive errors like:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Archivos de programa\Abyss Web Server\htdocs\bio.php on line 9

The line 9 is

$row = mysql_fetch_array($response);

The previuos sentences are:

$db = mysql_connect("localhost", user , pass);
mysql_select_db(historia,$db);
$response = mysql_query("select * from bio_his where indice=$id", $db);

I supposed that it seems to be a problem with the variables sent by the previuos page, but in the Internet (not locally) I do not receive that errors.

It is something that I have to set anywhere in my computer??

Thanks to anyone for your help.

Ezequiel
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun Feb 29, 2004 3:58 pm    Post subject: Re: Help with queries Reply with quote

esapo,

If $id is a variable that comes from a POST or a GET request, you have to change ot to $_REQUEST['id'] or to set register_globals to on in php.ini .

Search for "Undefined variable" in this section of the forum for more information about the new PHP variable naming convention.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group