MySQL Forums
Forum List  »  Newbie

Re: PHP variables as table name
Posted by: Felix Geerinckx
Date: May 30, 2005 01:54AM

alen.pros wrote:

> Is there any way I could use php variable as table name in mysql select query? Example:
> $upit="select * from '$odabrano'"; /*this doesn't work */

Don't use '-quotes around your table variable, use `-quotes (ie. backticks)

--
felix
Please use BBCode to format your messages in this forum.

Options: ReplyQuote


Subject
Written By
Posted
May 29, 2005 01:14PM
Re: PHP variables as table name
May 30, 2005 01:54AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.