02-11-2008, 07:11 PM
|
#7 (permalink)
|
|
The Wanderer
Join Date: Feb 2008
Location: Blackpool, England
Posts: 16
Thanks: 2
|
Group is a MySQL Keyword, you need to put it into quotes IE.
Code:
$res = mysql_query("
SELECT *
FROM `video`
WHERE `group` = '" . $_GET[cat] . "'
ORDER BY `id` DESC
LIMIT ". $premierMessageAafficher .", ". $nombreDeMessagesParPage
) or die(mysql_error());
OR
Code:
$res = mysql_query("
SELECT *
FROM video v
WHERE v.group = '" . $_GET[cat] . "'
ORDER BY v.id DESC
LIMIT ". $premierMessageAafficher .", ". $nombreDeMessagesParPage
) or die(mysql_error());
In future you'd probably be best entering your query into phpMyAdmin if available, this will give a more detailed response.
|
|
|
|