SQL question
SQL question
- Started
- Last post
- 3 Responses
- acescence0
mysql_fetch_array only returns one row at a time. you need to loop thru the result to get all of the rows
- acescence0
$result = mysql_query( "SELECT blah" );
while ( $row = mysql_fetch_array($result, MYSQL_NUM) ) {
print_r( $row );
}
- section_0140
oh, I didn't realize it only returned one result. I thought it returned an array, hence the name. I know the number of rows ahead of time and was using it like:
echo $row[0];
echo $row[1];Weird.