$sql = 'SELECT F.IDArea, C.IDArea, C.Name, C.Pop, C.Nationality, C.NationalityPlural, C.NationalityAdjective FROM cia_people C, famarea2 F WHERE (C.Nationality is not null) AND (F.IDArea = \'eur\') ORDER BY ' . {$_POST['order']} . ',' . {$_POST['direction']};
and try it again. Note the variables are outside the string and surounded by brackets.
Respectfully, Ligaya Turmelle
Michael J. Pawlowsky wrote:
It's not translating your vars to their respective values. I didn't look to see why...
But MySQL doesn't know what $_POST['order']
is.
David Blomstrom wrote:
This may be a purely PHP problem, but the error message says "SQL syntax. Check the manual that corresponds to your MySQL server version..."
Failed to run SELECT F.IDArea, C.IDArea, C.Name, C.Pop, C.Nationality, C.NationalityPlural, C.NationalityAdjective FROM cia_people C, famarea2 F WHERE (C.Nationality is not null) AND (F.IDArea = 'eur') ORDER BY $_POST['order'], $_POST['direction'] - 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 '['order'], $_POST['direction']' at line 11
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]