$cid = mysql_connect($host,$usr,$pwd);
mysql_query("SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'", $cid);
mysql_select_db($db);
if (mysql_error()) { print "Database ERROR: " . mysql_error(); }
$sql = "SELECT p.*, pt.*, pp.*, pm.* FROM e_print as p, e_print_type as pt, e_print_producer as pp, e_print_model as pm
WHERE p.id_model=$idd AND p.id_type=pt.id AND p.id_producer=pp.id AND p.id_model=pm.id LIMIT 1";
$rs = mysql_query($sql, $cid) or die(mysql_error());
if (mysql_error()) { print "Database Error: $sql " . mysql_error(); }
?>
while ( $row = mysql_fetch_array($rs) )
{
$id_type = $row["type"];
$id_producer = $row["producer"];
$id_model = $row["model"];
$nuotrauka = $row["foto"];
$ff=str_replace(" ","%20",$nuotrauka);
$spalva = $row["spalva"];
$text = $row["text"];
$price = $row["price"];
?>
if(!empty($nuotrauka))
echo " ";
else echo "-";
?>
|
|
|
| Aprašymas: |
print "$text" ?> |
|
|
| Tipas: |
print "$id_type" ?> |
| Gamintojas: |
print "$id_producer" ?> |
| Modelis: |
print "$id_model" ?> |
| Kaina: |
print "$price" ?> Lt. |
} //ciklo pabaiga
?>