Forum Moderators: coopster
I'm hacking through some PHP code at the moment. The queries there have been set up in this fashion:
$query = "INSERT into ".$EVENTS_TB." VALUES ...
My instinctive feeling is use the table as it's named in database (mysql) and to get on with it from there.
Look forward to some opinions - TIA.
So it's fairly normal.
Does it work? If so what in particular are you
worried about?
coopster, you hit it on the nail - as in making a single change should the table name ever change.
jatar_k - yes it works at present. As ever, the concern is security. But then, this is where my php newbie green horns show up. Not being let's say, visually familiar, with this sort of set up - it struck me as being strange. This app only uses 3 tables although it may become part of another CMS-type app later on. But, this wouldn't have any real bearing on the app itself.