TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 07-24-2009, 11:27 PM   #1 (permalink)
The Visitor
 
Join Date: Jun 2009
Posts: 4
Thanks: 0
woowoo is on a distinguished road
Default Not Valid, Db Connection Error?

I get an error for my shppoing cart realted to the downalod link.

Code:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/imdoll/public_html/dl/index.php on line 14
The code on the download page is..

Code:
k = $_GET["k"];

$info = explode("|", $k);


//check the exp date
$q1 = "select ExpDate from dd_orders_info where OrderID = $info[0]";
$result = mysql_query($q1);
while ($res = mysql_fetch_row($result))  line14


{
	$exp = $res[0];
	$ItemID = $res[1];
}

if($exp < $t)
{
	echo "<br><br><br><center><font face=verdana size=2 color=red><b>Your download link is not active and<br>you are not able to download this file!";

	exit();
}
Does anyone know what the error could be?

Thanks.
woowoo is offline  
Reply With Quote
Old 07-25-2009, 09:25 AM   #2 (permalink)
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

You need to check what is being returned from mysql_query() as it looks like the query is failing for some reason—could be you aren't connected to the database, or the query itself has invalid syntax, etc.. You can get at the error with mysql_error().
Salathe is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Parse error: parse error,syntex error unexpected ',' expectingT_STRING in my code tech Absolute Beginners 13 01-29-2013 10:00 AM
cant work this error out talonos Absolute Beginners 11 07-13-2009 11:03 AM
Can't solve browser error Peuplarchie Absolute Beginners 1 06-09-2008 05:48 AM
Keep getting mySQL error No. 1064, but i can't seem to find the problem Durux MySQL & Databases 8 04-13-2008 07:51 PM
an error makes me crazy nuts !!!!!!! webtuto Absolute Beginners 1 02-27-2008 10:31 AM


All times are GMT. The time now is 09:01 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design