Follow us on Twitter!
Few are those who can see with their own eyes and hear with their own hearts. - Albert Einstein
Thursday, April 24, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 27
Guests Online: 21
Members Online: 6

Registered Members: 82895
Newest Member: kevy90
Latest Articles
View Thread

HellBound Hackers | Computer General | Webmasters Lounge

Author

yet another php prob

mrdj204
Member



Posts: 168
Location: Landing NJ USA
Joined: 17.01.06
Rank:
Newbie
Posted on 18-02-07 08:08
why is it i get this error

Code
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/djthegod/public_html/money/index.php on line 9

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/djthegod/public_html/money/index.php on line 13




with this code?
Code

<?php

include "config.php";

$lol = mysql_query('SELECT,Item FROM money ORDER BY Item DESC');
$lol2 = mysql_query('SELECT,Value FROM money ORDER BY Item DESC');
$lol3 = mysql_query('SELECT,Total FROM money ORDER BY Item DESC');

mysql_fetch_array($lol);

echo "<center><table border=1><tr><td><center>Item</center></td><td><center>Price</center></td><td><center>Funds</center></td></tr>";

While ($row = mysql_fetch_array($lol))
{

  echo "<tr><td><center><a href=edit.php?=" . $row['Item'] . ">" . $row['Item'] . "</center></td>";
 
  mysql_fetch_array($lol2);
 
  echo "<td><center>$" . $row['Value'] . "</center></td>";
 
  mysql_fetch_array($lol3);
 
  echo "<td><center>$" . $row['Total'] . "</center></td></tr>";
 
}
 
?>




any help would be appreciated, as usual
mrdj204@hotmail.com mrdj204 http://l2p-network.com/
Author

RE: yet another php prob

mrdj204
Member



Posts: 168
Location: Landing NJ USA
Joined: 17.01.06
Rank:
Newbie
Posted on 18-02-07 08:24
nah, that didnt work, but thx
mrdj204@hotmail.com mrdj204 http://l2p-network.com/
Author

RE: yet another php prob

mrdj204
Member



Posts: 168
Location: Landing NJ USA
Joined: 17.01.06
Rank:
Newbie
Posted on 18-02-07 08:29
nopeAngryAngryAngryAngryAngryAngryAngry
mrdj204@hotmail.com mrdj204 http://l2p-network.com/
Author

RE: yet another php prob


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 18-02-07 09:33
You need to remove the , after select
Author

RE: yet another php prob


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 18-02-07 09:57
Have you connected to the database?

Selected the db?


Author

RE: yet another php prob


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 18-02-07 12:01
heres your problem:
Code

mysql_fetch_array($lol);

echo "<center><table border=1><tr><td><center>Item</center></td><td><center>Price</center></td><td><center>Funds</center></td></tr>";

While ($row = mysql_fetch_array($lol))
{



as soon as you get a result form a mysql query it becomes invalid. as in you cant use the same result twice.


Author

RE: yet another php prob

mrdj204
Member



Posts: 168
Location: Landing NJ USA
Joined: 17.01.06
Rank:
Newbie
Posted on 18-02-07 15:50
@Ice-bullet:
you got rid off the errors. thxSmile

@mozzer: yah it is connected

@mr noob: thx for that, Smile

Edited by mrdj204 on 18-02-07 15:50
mrdj204@hotmail.com mrdj204 http://l2p-network.com/