PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
jaylin
Forum Commoner
Posts: 68 Joined: Fri Nov 18, 2005 4:44 am
Post
by jaylin » Tue Dec 06, 2005 1:32 am
in php, i dun know who to handle sql reserved word in the query string. plz tell me.
shiznatix
DevNet Master
Posts: 2745 Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:
Post
by shiznatix » Tue Dec 06, 2005 1:42 am
you are going to have to be more specific. if you want to use a sql reserved word in a mysql query then just put it in the query.
jaylin
Forum Commoner
Posts: 68 Joined: Fri Nov 18, 2005 4:44 am
Post
by jaylin » Tue Dec 06, 2005 1:46 am
for example my table name is "SELECT" and my field name is "FROM", so, wht i should do?
shiznatix wrote: you are going to have to be more specific. if you want to use a sql reserved word in a mysql query then just put it in the query.
Skittlewidth
Forum Contributor
Posts: 389 Joined: Wed Nov 06, 2002 9:18 am
Location: Kent, UK
Post
by Skittlewidth » Tue Dec 06, 2005 4:37 am
put back-ticks round the table name and field name ie.
That's seriously going to confuse you when you go back to edit your code though. Why would you name your tables this way?
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Tue Dec 06, 2005 4:44 am
Sounds like school work