Jump to content

Record NOT repeating?


yandoo

Recommended Posts

Hi there,

 

I have a query that selects records in a table where the ID = to the ID of another table. The trouble is that it doesnt repeat the results, it only outputs the 1st record!??

 

mysql_select_db($database_connect, $connect);
$query_vege = "SELECT * FROM vegetable WHERE VegeID='" .
$row_growplan['VegeID'] . "'";
$vege = mysql_query($query_vege, $connect) or die(mysql_error());

while ($row_vege = mysql_fetch_assoc($vege)) {
    echo $row_vege["Name"]."<br />\n";
}           
    	echo"<br>";

?>

 

The growplan query selects records that = the same userrname as the session name e.g.

 

mysql_select_db($database_connect, $connect);
$query_growplan = sprintf("SELECT * FROM vegeschedule WHERE Username = '%s'", $colname_growplan);
$query_limit_growplan = sprintf("%s LIMIT %d, %d", $query_growplan, $startRow_growplan, $maxRows_growplan);
$growplan = mysql_query($query_limit_growplan, $connect) or die(mysql_error());
$row_growplan = mysql_fetch_assoc($growplan);

 

What am i missing here? Please help

 

Thank You :)

Link to comment
https://forums.phpfreaks.com/topic/165343-record-not-repeating/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.