Phpu wrote:

I want to interogate the database and the results to be placed into array.

For now i have:

$query = "SELECT product_id, brand_name, model_name FROM products WHERE 
product_id='$product_id'";
$result = mysql_query($query) or die("error in query - $query - ".mysql_error());
 $results = mysql_num_rows($result);


I want all athe results to be placed in an array named "models" and then i want to print all the results. How can i do that.
PS. The results must be placed in an array.

while($row = mysql_fetch_assoc($results)) { $models[] = $row; } echo "<pre>"; print_r($models); echo "</pre>";

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to