PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 16th, 2004, 08:32 PM
Qube Qube is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 3 Qube User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
MYSQL_Fetch_Array not returning a thing...

Normally I don't come on to a forum and ask questions before actually posting a few general topics, but promise I will maake a start on that after I post this...

I have the SQL statement, Everything is fine up till the point where i do the fetch_array.

I have run the SQL statement on the DB using my DB manager and it pulls out the values for the to fields.

$result is equally to a Resource ID, but the line $row = mysql_fetch_array($result) is not returning a value when I try and echo and of the results of ROW.

Could it be my DB Table structure? I have one table with the following fields

ID (INT AUTO...), UID (VARCHAR 10), Client(VARCHAR 255), Password(VARCHAR 8), HomePage (VARCHAR 255), Email (VARCHAR 255) Do I need to change the field data types.. After looking around at other scripts I seem to have everything in tact so Im a little bit lost..

Could there be somthing in my PHP or MYSQL config files that is causing it to be a pain..

Any pointers in the right direction would be great...

PHP Code:
 $sql "SELECT Client, HomePage FROM details WHERE uid='$u' AND password=PASSWORD('$p')";
$result mysql_query($sql);
$row mysql_fetch_array($result); 

Reply With Quote
  #2  
Old September 16th, 2004, 09:47 PM
Qube Qube is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 3 Qube User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Go figure I changed.

password=PASSWORD('$p');
with
password='$p';

and it worked for me...

Next obvious question is
What is the difference between the two? I will do some research into that..

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > MYSQL_Fetch_Array not returning a thing...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT