![]() |
WHERE `id` = 'a-number-here' problem
Hi, I have a problem:
PHP Code:
PHP Code:
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 '?id? = '16'' at line 1 What am i doing wrong? |
What are those funny characters around page and id, try removing them.
|
nope same thing. Ive had this problem before. It only occurs when the value contains numbers. Am I the only one with this problem? :S
|
try removing the space id='$id'
|
You somehow managed to use front ticks. Here's how I'd rewrite it (fix + my style):
$sql = 'SELECT * FROM `page` WHERE `id` = "' . $id . '"'; |
very very strange....i changed:
PHP Code:
PHP Code:
Thanks for all the help guys! |
$_POST is from forms where the method is set to post. $_GET is from the query string (showthread.php?t=5), and $_REQUEST combines the two, as well as a few others.
|
All times are GMT. The time now is 11:40 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|