Hi. I am very new with php. can you help me with this:
This code is printing part of the string: image and image_id, but gameandtoyname and pricetype NO. What i am doing wrong? any help?
<?php
$sql = "SELECT gameandtoyname, pricetype * FROM dollsimage, dolls where dollsimage.imag e_id=dolls.imag e_id";
$sql = "SELECT * FROM dollsimage ORDER BY image_date DESC";
$result = mysql_query ($sql, $conn);
if (mysql_num_rows ($result)>0) {
while ($row = mysql_fetch_arr ay($result, MYSQL_ASSOC)) {
$i++;
$str .= $i.". ";
$str .="<img border=\"1\" height=\"90\" width=\"100\" src=\"imagedoll s.php?act=view& iid=".$row["image_id"]." ".$row["gameandtoyname "]." ".$row["pricetype"]." \"></a> ";
}
print $str;
}
?>
This code is printing part of the string: image and image_id, but gameandtoyname and pricetype NO. What i am doing wrong? any help?
<?php
$sql = "SELECT gameandtoyname, pricetype * FROM dollsimage, dolls where dollsimage.imag e_id=dolls.imag e_id";
$sql = "SELECT * FROM dollsimage ORDER BY image_date DESC";
$result = mysql_query ($sql, $conn);
if (mysql_num_rows ($result)>0) {
while ($row = mysql_fetch_arr ay($result, MYSQL_ASSOC)) {
$i++;
$str .= $i.". ";
$str .="<img border=\"1\" height=\"90\" width=\"100\" src=\"imagedoll s.php?act=view& iid=".$row["image_id"]." ".$row["gameandtoyname "]." ".$row["pricetype"]." \"></a> ";
}
print $str;
}
?>
Comment