Guest_imported
New member
- Jan 1, 1970
- 0
When i try to insert a record and select the same record
immeidiately from the table it doesn't display the first record.
When i insert the second record i'm able to select the second record.But the first record is not displayed.
Step1:Trying to insert a record using this statements
$query = "insert into cd_order values ( '".$date_added ."','".$session ."','".$cd_title ."')";
$result = mysql_query($query);
Step2:Trying to selct the same record
$result = mysql_query( "SELECT cd_title frOM cd_order where session='$session' "
$row = mysql_fetch_array($result);
$num_results = mysql_num_rows($result);
Step3:Trying to display the records in a table format which displays all the records other than the first record
for ($i=0 ;$i <= $num_results -1; $i++)
{
$row = mysql_fetch_array($result);
{
echo "<TR><TD >" .$row[cd_title]. "</TD>\n";
}
}
Hope someone will help with the solution.
immeidiately from the table it doesn't display the first record.
When i insert the second record i'm able to select the second record.But the first record is not displayed.
Step1:Trying to insert a record using this statements
$query = "insert into cd_order values ( '".$date_added ."','".$session ."','".$cd_title ."')";
$result = mysql_query($query);
Step2:Trying to selct the same record
$result = mysql_query( "SELECT cd_title frOM cd_order where session='$session' "
$row = mysql_fetch_array($result);
$num_results = mysql_num_rows($result);
Step3:Trying to display the records in a table format which displays all the records other than the first record
for ($i=0 ;$i <= $num_results -1; $i++)
{
$row = mysql_fetch_array($result);
{
echo "<TR><TD >" .$row[cd_title]. "</TD>\n";
}
}
Hope someone will help with the solution.