$dbc = mysqli_connect('localhost', 'galeria','map90c','galeria') OR die(mysqli_connect_error());
mysqli_set_charset($dbc, 'utf-8');
$sql = "SELECT * FROM galeria_kategorie WHERE typ = 4 ORDER BY nazwa";
$res = mysqli_query($dbc, $sql);
if(mysqli_num_rows($res)>0){
echo mysqli_num_rows($res);
}
//require "/inc.php";
// $res = sql ("SELECT * FROM galeria_kategorie WHERE typ = 4 ORDER BY nazwa");
$num_row = mysqli_num_rows($res);
echo "Kategorie tekstów\n"; echo "| \n"; while ($row = mysqli_fetch_array($res)) { $kat[]=$row[nazwa]; $kat_id[]=$row[id]; echo "$row[nazwa] | \n"; } echo "\n"; if ( $katc ) { $res = sql ("SELECT * FROM galeria_kategorie WHERE typ = 4 and id = $katc"); $row = mysql_fetch_array($res); echo " Kategoria: $row[nazwa]\n"; $res = sql ("select * from galeria_cytaty where typ = 4 and kategoria = $katc"); } else { $res = sql ("select * from galeria_cytaty where typ = 4 order by rand() limit 17"); echo "Losowe\n"; } $num_row = mysql_num_rows($res); while ($row = mysql_fetch_array($res)) { echo "$row[cytat] $row[autor] \n"; } echo "\n "; ?> |
include ("reklama-pionowa.php"); ?> |