Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 06-27-2005, 08:19 PM Query problem
bman's Avatar
Skilled Talker

Posts: 85
Location: USA
Trades: 0
Can someone see what is wrong with this query? I receive my error message ‘can not execute’ . I believe it to be a syntax error.

Code:
$sql = "SELECT * FROM users WHERE email='$email' AND password ='$password'";

//execute query
$rs = mysql_query($sql,$connection) or die("can not execute");

$abs = mysql_fetch_array($rs) ;
bman is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-27-2005, 08:22 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
Location: Toronto, Ontario
Trades: 0
Replace the 'can not execute' string with a call to mysql_error() to receive a more detailed message.
Code:
 ... or die('Error: ' . mysql_error());
__________________

Please login or register to view this content. Registration is FREE
- Latest Articles:
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE

--
Please login or register to view this content. Registration is FREE

Christopher is offline
Reply With Quote
View Public Profile
 
Old 06-27-2005, 08:55 PM
bman's Avatar
Skilled Talker

Posts: 85
Location: USA
Trades: 0
Thanks, it gave me the answer. Bad db name, typo
bman is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Query problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11408 seconds with 12 queries