Ok, this is a real newbie question I'm sure, but the book i am using doesn't really shed to much light on this topic.
How do you know what to use and when?
I understand the concept behind them. But i just don't know how to decide before hand what works.
I have a query that will return one row from a MySQL table.
Now for some reason I have to hard code the exact things I want out of it.
I know i may not be explaining myself properly so here is the query:
$sql = "SELECT * FROM `Questions` WHERE `ID`='$id' AND `Name` = '$Name'";
$result = mysql_query('$sql) or die(mysql_err());
$i=0;
while ( $row = $mysql_fetch_row($result)) {
echo $row['$i'];
$i++;
}
Any thoughts on why this may not work. I sometimes get one value out of it and thats it. It does not seem to loop threw it. Or should i be putting it into a for loop?
Thanx for any help,
ulysses