|
Posted by Robin on 12/17/47 11:53
Frankie wrote:
> 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
>
>
I hope you're checking those $_POST variables before blindly making the
SQL call!
Robin
Navigation:
[Reply to this message]
|