Forum Moderators: coopster
i have this script
<?
//including teh dbconnection script
include"conn.php";
while($links = mysql_fetch_row( mysql_query('select * from content))) {echo $links[id];};
?>
Its So small its almost inpossible to detect an error in it.
Anyways what it does now is puttying as many times the id after eachother but i dont know why it does this. Anyone experianced this before?
Thanks for you help :D.
Adding a limitative clause like:
for ex:
('select * from content where whatever=’$wharever’)))
Or
('select * from content ORDER BY user_id DESC LIMIT 1)))
or combo
('select * from content where whatever=’$wharever’ ORDER BY user_id DESC LIMIT 1)))
While looking around I found a thread [webmasterworld.com] that can give you
some help about looping
Is this maybe a problem with the php version i am using? 5.2 something i believe...
WHILE ($row = mysql_fetch_row(mysql_query('select * from content')))
ITS JUST THIS LINE WHAT TEH **** IS WRONG I CANT FIND IT RAAGHH evertime i get this max execution time... this just sux
Give a brief overview of what's in the table, and what you expect the query to do, and what the desired output should be ...
Perhaps you also need to read up on what the error means: [php.net...]
The table content:
id title link content
1 home home this is the test home page
Im just askin mysql to loop the id's.
Here is the code (not big at all):
<?
//including teh dbconnection script
include"conn.php";
WHILE ($row = mysql_fetch_row(mysql_query('select * from content')))
?>