Warning: Mysql_fetch_row(): Supplied Argument Is Not A Valid MySQL Result Resource In
Posted On Mon Jun 18, 2007 By bret In MySQL Forums And Topics Discussions About Open Source Database Forums
ok, so how do you fix this error?
i have a script that i created and i can't get passed this.
i was told by a friend that you guys and webune have excellent support, how can you help me?
i have a script that i created and i can't get passed this.
i was told by a friend that you guys and webune have excellent support, how can you help me?
bret Mon Jun 18, 2007
thanks, that worked for me.
thanks webune, i really appreciated.
im new at this, but it really helps to have guys like this, that's why i have two of my websites hosting at webune.com
thanks for your help.
thanks webune, i really appreciated.
im new at this, but it really helps to have guys like this, that's why i have two of my websites hosting at webune.com
thanks for your help.
webune Mon Jun 18, 2007
ok, i found your problem, you need to enclose the value
replace this:
$sql = "select count(*) as total from ".$db_prefix."table where id = $id";
with this:
$sql = "select count(*) as total from ".$db_prefix."table where id = '$id'";
all i basically added was single quotes on you $id to make it look like this: '$id'
try it and let me know if it helps
replace this:
$sql = "select count(*) as total from ".$db_prefix."table where id = $id";
with this:
$sql = "select count(*) as total from ".$db_prefix."table where id = '$id'";
all i basically added was single quotes on you $id to make it look like this: '$id'
try it and let me know if it helps
bret Mon Jun 18, 2007
sure, this is what i see now:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/www/index.php on line 158
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
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/www/index.php on line 158
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
webune Mon Jun 18, 2007
replace
$row = mysql_fetch_row($result);
with this
if(! $row = mysql_fetch_row($result)){echo mysql_error();}
this will show you what the error you are getting from the mysql server
post the error here ok
$row = mysql_fetch_row($result);
with this
if(! $row = mysql_fetch_row($result)){echo mysql_error();}
this will show you what the error you are getting from the mysql server
post the error here ok
bret Mon Jun 18, 2007
sure, it looks like this:
$sql = "select count(*) as total from ".$db_prefix."table where id = $id";
$result = mysql_query($sql ,$db);
$row = mysql_fetch_row($result);
$sql = "select count(*) as total from ".$db_prefix."table where id = $id";
$result = mysql_query($sql ,$db);
$row = mysql_fetch_row($result);
webune Mon Jun 18, 2007
can you provide your sql query please?
Related Content
Information
Forums »
MySQL Forums And Topics Discussions About Open Source Database »
Warning: Mysql_fetch_row(): Supplied Argument Is Not A Valid MySQL Result Resource In
MySQL Forums And Topics Discussions About Open Source Database »
Warning: Mysql_fetch_row(): Supplied Argument Is Not A Valid MySQL Result Resource In
Title: Warning: Mysql_fetch_row(): Supplied Argument Is Not A Valid MySQL Result Resource In
Description: Warning: Mysql_fetch_row(): Supplied Argument Is Not A Valid MySQL Result Resource In
Tags: warning ,mysql ,fetch ,row ,supplied ,argument ,is ,not ,a ,valid ,mysql ,result ,resource ,in
Info: This Post Has Been Viewed 0 Times Since
Date: Mon Jun 18, 2007
Author bret Received 6 Replies #880
Date: Mon Jun 18, 2007
Author bret Received 6 Replies #880
Share
URL: 

Embed: 

To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it
BBCODE:: 

BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
wallpaperama | Wallpapers | Forums | Terms Of Service
copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Mon May 06, 2013 (-8 GMT)
Powered by: Webune Forums V5
copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Mon May 06, 2013 (-8 GMT)
Powered by: Webune Forums V5