| Author |
Re: [PHP-DB] problem....
|
|
| Cole S. Ashcraft 2004-06-22, 10:42 pm |
| Just from looking at it, it seems to be because you are redefining a
variable, which destroys it, then calling for a mysql resource that has
been destroyed. What is the error?
I can't gaurantee that that is what is happening.
Cole
> why doesn't this work:
> $pic=mysql_query('SELECT Rune, username FROM RuneRunner
> RuneRunner_1 WHERE (User_ID = 3)',$connection);
> $pic=mysql_fetch_array($pic);
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is believed to be clean.
>
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is believed to be clean.
| |
| Daniel Clark 2004-06-22, 10:42 pm |
| What error are you getting?
> why doesn't this work:
> $pic=mysql_query('SELECT Rune, username FROM RuneRunner
> RuneRunner_1 WHERE (User_ID = 3)',$connection);
> $pic=mysql_fetch_array($pic);
| |
| Water_foul 2004-06-22, 10:42 pm |
| I tried that it didn't work
"Cole S. Ashcraft" <cashcraft@ashcraftfamily.net> wrote in message
news:51682.206.169.177.240.1087948933.squirrel@206.169.177.240...
> Just from looking at it, it seems to be because you are redefining a
> variable, which destroys it, then calling for a mysql resource that has
> been destroyed. What is the error?
>
> I can't gaurantee that that is what is happening.
>
> Cole
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is believed to be clean.
| |
| Water_foul 2004-06-22, 10:42 pm |
| Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in .......
"Daniel Clark" <dclark@nwlink.com> wrote in message
news:16692.65.203.232.102.1087950853.squirrel@webmail.pacifier.com...[color=darkred]
> What error are you getting?
>
| |
| Daniel Clark 2004-06-22, 10:42 pm |
| Sounds like it doesn't like your SQL statement. Perhaps a field or table
name is incorrect?
[color=darkred]
> Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
> result
> resource in .......
> "Daniel Clark" <dclark@nwlink.com> wrote in message
> news:16692.65.203.232.102.1087950853.squirrel@webmail.pacifier.com...
| |
| Water_foul 2004-06-22, 10:42 pm |
| I checked em all they were right
"Daniel Clark" <dclark@nwlink.com> wrote in message
news:18323.65.203.232.102.1087951969.squirrel@webmail.pacifier.com...[color=darkred]
> Sounds like it doesn't like your SQL statement. Perhaps a field or table
> name is incorrect?
>
| |
| Shahmat Bin Dahlan 2004-06-22, 10:42 pm |
| Your SQL statement:
'SELECT Rune, username FROM RuneRunner
RuneRunner_1 WHERE (User_ID = 3)'
What is "RuneRunner" and "RuneRunner_1"? Are these two different tables.
If it is, you might want to separate them with a comma.
Why not try getting rid of the brackets surrounding "User_ID=3"? And
also wrap single quotes around the digit "3".
----- Original Message -----
From: "water_foul" <phpdbnews@aaron.aichlmayr.net>
Date: Wednesday, June 23, 2004 8:58 am
Subject: Re: [PHP-DB] problem....
> I checked em all they were right
> "Daniel Clark" <dclark@nwlink.com> wrote in message
> news:18323.65.203.232.102.1087951969.squirrel@webmail.pacifier.com...
> or table
> MySQL> > result
> news:16692.65.203.232.102.1087950853.squirrel@webmail.pacifier.com...>
> RuneRunner> >> > RuneRunner_1 WHERE (User_ID = 3)',$connection);
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
| |
| Water_foul 2004-06-22, 10:42 pm |
| i fixed those things and it didn't fix it :( :( :( :( :( :( :( :( :( is
there a icq chatroom for php?)
"Shahmat Bin Dahlan" <shahmatd@sains.com.my> wrote in message
news:16780f91a.f91a16780@mail.sarawaknet.gov.my...[color=darkred]
> Your SQL statement:
>
> 'SELECT Rune, username FROM RuneRunner
> RuneRunner_1 WHERE (User_ID = 3)'
>
> What is "RuneRunner" and "RuneRunner_1"? Are these two different tables.
> If it is, you might want to separate them with a comma.
>
> Why not try getting rid of the brackets surrounding "User_ID=3"? And
> also wrap single quotes around the digit "3".
>
>
> ----- Original Message -----
> From: "water_foul" <phpdbnews@aaron.aichlmayr.net>
> Date: Wednesday, June 23, 2004 8:58 am
> Subject: Re: [PHP-DB] problem....
>
| |
| Cole S. Ashcraft 2004-06-22, 10:42 pm |
| The error he is getting means that his MySQL resource (in this case the
results of the query) does not exist. Try
$pic1=mysql_fetch_array($pic);
Also, can you give the exact text of the error (line number and all) and line numbers for the entire passage?
Cole
Shahmat Bin Dahlan wrote:
>Your SQL statement:
>
>'SELECT Rune, username FROM RuneRunner
>RuneRunner_1 WHERE (User_ID = 3)'
>
>What is "RuneRunner" and "RuneRunner_1"? Are these two different tables.
>If it is, you might want to separate them with a comma.
>
>Why not try getting rid of the brackets surrounding "User_ID=3"? And
>also wrap single quotes around the digit "3".
>
>
>----- Original Message -----
>From: "water_foul" <phpdbnews@aaron.aichlmayr.net>
>Date: Wednesday, June 23, 2004 8:58 am
>Subject: Re: [PHP-DB] problem....
>
>
>
>
>
>
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is believed to be clean.
| |
| Cole S. Ashcraft 2004-06-22, 10:42 pm |
| I need the exact error message. Copy Paste it from the browser. I also
need line numbers.
Cole
water_foul wrote:
>i fixed those things and it didn't fix it :( :( :( :( :( :( :( :( :( is
>there a icq chatroom for php?)
>"Shahmat Bin Dahlan" <shahmatd@sains.com.my> wrote in message
>news:16780f91a.f91a16780@mail.sarawaknet.gov.my...
>
>
>
>
>
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is believed to be clean.
| |
| Shahmat Bin Dahlan 2004-06-22, 10:44 pm |
| Yes, your right, but I also think his MySQL SQL statement needs to be
checked.
Maybe can also try to add this right after the mysql_query function call.
echo mysql_errno() . ": " . mysql_error() . "\n";
----- Original Message -----
From: "Cole S. Ashcraft" <cashcraft@ashcraftfamily.net>
Date: Wednesday, June 23, 2004 9:47 am
Subject: Re: [PHP-DB] problem....
> The error he is getting means that his MySQL resource (in this
> case the
> results of the query) does not exist. Try
>
> $pic1=mysql_fetch_array($pic);
> Also, can you give the exact text of the error (line number and
> all) and line numbers for the entire passage?
>
> Cole
>
>
> Shahmat Bin Dahlan wrote:
>
> tables.>If it is, you might want to separate them with a comma.
> field
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is believed to be clean.
>
>
| |
| Daniel Clark 2004-06-22, 10:49 pm |
| What error are you getting?
> why doesn't this work:
> $pic=mysql_query('SELECT Rune, username FROM RuneRunner
> RuneRunner_1 WHERE (User_ID = 3)',$connection);
> $pic=mysql_fetch_array($pic);
| |
| Water_foul 2004-06-22, 10:49 pm |
| I tried that it didn't work
"Cole S. Ashcraft" <cashcraft@ashcraftfamily.net> wrote in message
news:51682.206.169.177.240.1087948933.squirrel@206.169.177.240...
> Just from looking at it, it seems to be because you are redefining a
> variable, which destroys it, then calling for a mysql resource that has
> been destroyed. What is the error?
>
> I can't gaurantee that that is what is happening.
>
> Cole
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is believed to be clean.
| |
| Water_foul 2004-06-22, 10:49 pm |
| Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in .......
"Daniel Clark" <dclark@nwlink.com> wrote in message
news:16692.65.203.232.102.1087950853.squirrel@webmail.pacifier.com...[color=darkred]
> What error are you getting?
>
| |
| Daniel Clark 2004-06-22, 10:49 pm |
| Sounds like it doesn't like your SQL statement. Perhaps a field or table
name is incorrect?
[color=darkred]
> Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
> result
> resource in .......
> "Daniel Clark" <dclark@nwlink.com> wrote in message
> news:16692.65.203.232.102.1087950853.squirrel@webmail.pacifier.com...
| |
| Water_foul 2004-06-22, 10:49 pm |
| I checked em all they were right
"Daniel Clark" <dclark@nwlink.com> wrote in message
news:18323.65.203.232.102.1087951969.squirrel@webmail.pacifier.com...[color=darkred]
> Sounds like it doesn't like your SQL statement. Perhaps a field or table
> name is incorrect?
>
| |
| Shahmat Bin Dahlan 2004-06-22, 10:49 pm |
| Your SQL statement:
'SELECT Rune, username FROM RuneRunner
RuneRunner_1 WHERE (User_ID = 3)'
What is "RuneRunner" and "RuneRunner_1"? Are these two different tables.
If it is, you might want to separate them with a comma.
Why not try getting rid of the brackets surrounding "User_ID=3"? And
also wrap single quotes around the digit "3".
----- Original Message -----
From: "water_foul" <phpdbnews@aaron.aichlmayr.net>
Date: Wednesday, June 23, 2004 8:58 am
Subject: Re: [PHP-DB] problem....
> I checked em all they were right
> "Daniel Clark" <dclark@nwlink.com> wrote in message
> news:18323.65.203.232.102.1087951969.squirrel@webmail.pacifier.com...
> or table
> MySQL> > result
> news:16692.65.203.232.102.1087950853.squirrel@webmail.pacifier.com...>
> RuneRunner> >> > RuneRunner_1 WHERE (User_ID = 3)',$connection);
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
| |
| Water_foul 2004-06-22, 10:49 pm |
| i fixed those things and it didn't fix it :( :( :( :( :( :( :( :( :( is
there a icq chatroom for php?)
"Shahmat Bin Dahlan" <shahmatd@sains.com.my> wrote in message
news:16780f91a.f91a16780@mail.sarawaknet.gov.my...[color=darkred]
> Your SQL statement:
>
> 'SELECT Rune, username FROM RuneRunner
> RuneRunner_1 WHERE (User_ID = 3)'
>
> What is "RuneRunner" and "RuneRunner_1"? Are these two different tables.
> If it is, you might want to separate them with a comma.
>
> Why not try getting rid of the brackets surrounding "User_ID=3"? And
> also wrap single quotes around the digit "3".
>
>
> ----- Original Message -----
> From: "water_foul" <phpdbnews@aaron.aichlmayr.net>
> Date: Wednesday, June 23, 2004 8:58 am
> Subject: Re: [PHP-DB] problem....
>
| |
| Cole S. Ashcraft 2004-06-22, 10:49 pm |
| The error he is getting means that his MySQL resource (in this case the
results of the query) does not exist. Try
$pic1=mysql_fetch_array($pic);
Also, can you give the exact text of the error (line number and all) and line numbers for the entire passage?
Cole
Shahmat Bin Dahlan wrote:
>Your SQL statement:
>
>'SELECT Rune, username FROM RuneRunner
>RuneRunner_1 WHERE (User_ID = 3)'
>
>What is "RuneRunner" and "RuneRunner_1"? Are these two different tables.
>If it is, you might want to separate them with a comma.
>
>Why not try getting rid of the brackets surrounding "User_ID=3"? And
>also wrap single quotes around the digit "3".
>
>
>----- Original Message -----
>From: "water_foul" <phpdbnews@aaron.aichlmayr.net>
>Date: Wednesday, June 23, 2004 8:58 am
>Subject: Re: [PHP-DB] problem....
>
>
>
>
>
>
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is believed to be clean.
| |
| Cole S. Ashcraft 2004-06-22, 10:49 pm |
| I need the exact error message. Copy Paste it from the browser. I also
need line numbers.
Cole
water_foul wrote:
>i fixed those things and it didn't fix it :( :( :( :( :( :( :( :( :( is
>there a icq chatroom for php?)
>"Shahmat Bin Dahlan" <shahmatd@sains.com.my> wrote in message
>news:16780f91a.f91a16780@mail.sarawaknet.gov.my...
>
>
>
>
>
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is believed to be clean.
| |
| Shahmat Bin Dahlan 2004-06-22, 10:49 pm |
| Yes, your right, but I also think his MySQL SQL statement needs to be
checked.
Maybe can also try to add this right after the mysql_query function call.
echo mysql_errno() . ": " . mysql_error() . "\n";
----- Original Message -----
From: "Cole S. Ashcraft" <cashcraft@ashcraftfamily.net>
Date: Wednesday, June 23, 2004 9:47 am
Subject: Re: [PHP-DB] problem....
> The error he is getting means that his MySQL resource (in this
> case the
> results of the query) does not exist. Try
>
> $pic1=mysql_fetch_array($pic);
> Also, can you give the exact text of the error (line number and
> all) and line numbers for the entire passage?
>
> Cole
>
>
> Shahmat Bin Dahlan wrote:
>
> tables.>If it is, you might want to separate them with a comma.
> field
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is believed to be clean.
>
>
| |
| David Robley 2004-06-24, 1:05 am |
| Water_foul wrote:
[color=darkred]
> i fixed those things and it didn't fix it :( :( :( :( :( :( :( :( :( is
> there a icq chatroom for php?)
> "Shahmat Bin Dahlan" <shahmatd@sains.com.my> wrote in message
> news:16780f91a.f91a16780@mail.sarawaknet.gov.my...
Two suggestions for debugging mysql problems:
1) Create your query as a variable so you can echo it and see exactly what
is being passed to mysql
$query = "SELECT Rune, username FROM RuneRunner, RuneRunner_1 WHERE User_ID
= 3";
2) Use mysql_error() to get the actual error from mysql
$result = mysql_query($query,$connection);
echo mysql_error();
$pic=mysql_fetch_array($result);
--
David Robley
"I'd like to learn a new card game," Tom said wistfully.
| |
| Richard Hutchins 2004-06-24, 1:05 am |
| Haven't seen that this has been solved yet so I thought I'd throw my two
cents into the fray. First of all, I'd second the earlier suggestion that
you assign your query to a variable. And, second, I'd recommend that you
echo out your query to the browser just before it is submitted to the
database server. That way, you can actually _see_ what's being sent to the
server. I have found this to be an invaluable troubleshooting tactic and it
may help you find the root cause of your invalid MySQL result.
> -----Original Message-----
> From: David Robley [mailto:robleyd@ozemail.com.au]
> Sent: Wednesday, June 23, 2004 2:53 AM
> To: php-db@lists.php.net
> Subject: Re: [PHP-DB] problem....
>
>
> Water_foul wrote:
>
> :( :( :( is
> different tables.
> "User_ID=3"? And
> news:18323.65.203.232.102.1087951969.squirrel@webmail.pacifier.com...
> Perhaps a field
> not a valid
> news:16692.65.203.232.102.1087950853.squirrel@webmail.pacifier.com...>
> 3)',$connection);
>
> Two suggestions for debugging mysql problems:
>
> 1) Create your query as a variable so you can echo it and see
> exactly what
> is being passed to mysql
>
> $query = "SELECT Rune, username FROM RuneRunner, RuneRunner_1
> WHERE User_ID
> = 3";
>
> 2) Use mysql_error() to get the actual error from mysql
> $result = mysql_query($query,$connection);
> echo mysql_error();
> $pic=mysql_fetch_array($result);
>
> --
> David Robley
>
> "I'd like to learn a new card game," Tom said wistfully.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
| |
| Jonathan Haddad 2004-06-24, 1:05 am |
| Please post the table definition to the mailing list so we can help you
more quickly. Also, is there a table called RuneRunner_1 or are you
meaning to use RuneRunner_1 as an alias?
Odds are, your problem is not PHP related, it's an error in your SQL syntax.
Jon
water_foul wrote:
>i fixed those things and it didn't fix it :( :( :( :( :( :( :( :( :( is
>there a icq chatroom for php?)
>"Shahmat Bin Dahlan" <shahmatd@sains.com.my> wrote in message
>news:16780f91a.f91a16780@mail.sarawaknet.gov.my...
>
>
>
>
>
| |
| Water_foul 2004-06-26, 3:55 pm |
| sorry i didn't respond quicker but i found out i hadn't uploaded my db to
the server :( sorry for wasting your time
"Richard Hutchins" <Richard.Hutchins@Getingeusa.com> wrote in message
news:1EA7D3AE70ACD511BE6D006097A78C1E058
87A05@USROCEXC...
> Haven't seen that this has been solved yet so I thought I'd throw my two
> cents into the fray. First of all, I'd second the earlier suggestion that
> you assign your query to a variable. And, second, I'd recommend that you
> echo out your query to the browser just before it is submitted to the
> database server. That way, you can actually _see_ what's being sent to the
> server. I have found this to be an invaluable troubleshooting tactic and
it[color=darkred]
> may help you find the root cause of your invalid MySQL result.
>
>
|
|
|
|