hi i have a db that has multiple rows inserted into it and no auto_increment. now to retrieve I am trying to use the code below to select all data from one column according to the tempID and order them by the imageNo but it is only selecting the 1st row......is this because i have no auto_increment?
Code:
mysql_connect($hostname,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$capSQL = "SELECT imageCap FROM flashGallery WHERE tempID = '{$random_digit}' ORDER BY imageNo";
$capRES = mysql_query( $capSQL ) or die( mysql_error );
if ( mysql_num_rows( $capRES ) > 0 )
{
$caps = mysql_fetch_array( $capRES );
print_r($caps);
}
mysql_close();
Comment