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
  #1  
Old May 23rd, 2002, 12: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: 2
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, 12: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: 24
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, 01: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: 2
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, 02:18 AM
Matt Matt is offline
Moderator
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 10 m 23 sec
Reputation Power: 6
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, 09: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: 2
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!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway