You are here: HELP: pesky SQL syntax error using PHP variables « PHP Programming Language « IT news, forums, messages
HELP: pesky SQL syntax error using PHP variables

Posted by Frankie on 10/22/00 11:52

Hello:

New user here...first post to group.

I'm getting an SQL syntax error when I try to run the following query:

$query = sprintf("SELECT itemNumber, entryDate, modifyDate, thumbnailURL,
title, price FROM '%s' WHERE itemNumber = '%s'", $_POST['selectCategory'],
$_POST['tfItemNum']);

I've tested the variables and they are populated.

Strangely, the query works with a variable in the WHERE clause, but not in
the FROM clause.

Any tips appreciated,

Frank H
Austin, TX

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация