Tutorials
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOtherTutorials

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old May 23rd, 2002, 01:54 AM
russ russ is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: London, UK
Posts: 129 russ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via AIM to russ Send a message via Yahoo to russ
problem with the new tutorial

i get this error on the new php mysql tutorial

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/gmflp/public_html/test.php on line 8

here is my code

php Code:
Original - php Code
  1.  
  2. <HTML>
  3. <?php
  4. $db = mysql_connect("localhost", "xxx", "xxx");
  5. mysql_select_db("learndb",$db);
  6. $result = mysql_query("SELECT * FROM personnel",$db);
  7. echo "<TABLE>";
  8. echo"<TR><TD><B>Full Name</B><TD><B>Nick Name</B><TD><B>Salary</B></TR>";
  9. while($myrow = mysql_fetch_array($result));
  10. {
  11. echo "<TR><TD>";
  12. echo $myrow["firstname"];
  13. echo " ";
  14. echo $myrow["lastname"];
  15. echo "<TD>";
  16. echo $myrow["nick"]
  17. echo "<TD>";
  18. echo $myrow["salary"];
  19. }
  20. echo "</TABLE>";
  21. ?>
  22. </HTML> 

Reply With Quote
  #2  
Old May 23rd, 2002, 01:58 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 25
RE: problem with the new tutorial

after the mysql_connect statement, put this:

echo mysql_errno().": ".mysql_error()."<BR>";

that should show you what kind of connection problem it is....


Reply With Quote
  #3  
Old May 23rd, 2002, 02:02 AM
russ russ is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: London, UK
Posts: 129 russ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via AIM to russ Send a message via Yahoo to russ
RE: problem with the new tutorial

now i get this error

0:
Full Name Nick Name Salary
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/gmflp/public_html/test.php on line 9


cheers for your help btw

Reply With Quote
  #4  
Old May 23rd, 2002, 03:18 AM
Matt Matt is offline
Contributing User
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 12 m 16 sec
Reputation Power: 7
RE: problem with the new tutorial

Hmm...add the same thing after the select_db...that must be where it is dying....

Reply With Quote
  #5  
Old May 23rd, 2002, 10:30 PM
russ russ is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: London, UK
Posts: 129 russ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via AIM to russ Send a message via Yahoo to russ
RE: problem with the new tutorial

okay this is the error i get now

0:
1044: Access denied for user: 'swouwih@localhost' to database 'learndb'
Full Name Nick Name Salary
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/gmflp/public_html/test.php on line 10


Reply With Quote
Reply

Viewing: Codewalkers ForumsOtherTutorials > problem with the new tutorial


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




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

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




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek