View Single Post
  #1 (permalink)  
Old 01-14-2002, 04:40 AM
tthurgo's Avatar
tthurgo tthurgo is offline
Moderator
 
Join Date: Jan 2002
Location: Lebanon, PA
Posts: 357
Reading data from MySQL

Hi,

I have a little problem with my code. I am trying to read data from a MySQL database using PHP. My code is as follows:

PHP Code:

$query 
"SELECT products.id,products.name,products.desc,addons.parent,addons.id,addons.name,addons.desc FROM products WHERE cat=cars LEFT JOIN addons ON addons.parent=products.id ORDER BY products.name";

$raw=MYSQL_QUERY($query);

while(
$arr=MYSQL_FETCH_ARRAY($raw)){

echo 
$arr["addons.id"]." ".$arr["addons.name"]." ".$arr["addons.desc"]."<br>";



This is what I use, I get no output though.

Tom
Reply With Quote