<?php require('config.php'); $sql="SELECT DATE_FORMAT(dodano, '%e-%m-%Y %H:%i') AS utworzono, autor, tresc, tytul, tagi, wstep, id FROM newsy WHERE tytul='".intval($_GET['tytul'])."'"; { } ?>
Po napisaniu tematu poradziłem sobie z tym usuwając inteval, lecz pytanie jak użyć dwa gety.?
$sql="SELECT DATE_FORMAT(dodano, '%e-%m-%Y %H:%i') AS utworzono, autor, tresc, tytul, tagi, wstep, id FROM newsy WHERE id='".($_GET['id'])."', tytul='".($_GET['tytul'])."'";
i po adresie test.php?tytul=test&id=1 wyświetla się błąd:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' tytul='test'' at line 1