Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.