Mam tabelę, a w niej kolumny takie jak:
id_user - id właściciela
pet_name - nazwa zwierzątka
pet_type - płeć
level - poziom
Chcę, aby wyświetlało mi to wszystko po wejściu w np. profil.php?id=2
Kod:
<html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" > <link rel="stylesheet" href="theme/style.css" type="text/css"> <link rel="Shortcut icon" href="theme/favicon.png" /> </head> <?php require ("config/polacz.php"); $id = $_GET['id']; $name = $_GET['name']; $sql = mysql_query("SELECT * FROM `adoptions` WHERE `pet_type`, `level`, `user` = '$pet_type', '$level', '$user'") or die('BŁĄD:'.mysql_error()); echo ' $name; <br> <b>Płeć:</b> '.$row['pet_type'].' <br> <b>Właściciel:</b> $id; <br> <b>Poziom:</b> '.$row['level'].' <br> '; } ?>
A, tutaj zwrócony błąd
Kod
BŁĄD:Something is wrong in your syntax obok ' `level`, `user` = '', '', ''' w linii 1