View Full Version : Accessing fields in DB
Hey folks,
What is the syntax to access a field in the DB? I know how to access cagetgory.DESCRIPTION and db fields like this, but what about a field that isn't accessed yet?
I tried $row['cagetgory.DESCRIPTION'] (for example) and it failed.
Thanks,
Eric
where are you trying to access the database from where?
:?:
(im hoping NOT from smarty)
Yes that's the problem. I want to grab row data from a field, and I thought I could simply do it from the TPL file. I guess not.
Eric
Content visible to registered users only.
no, you can, but only from within {php} {/php} tags
then you have to assign the values etc etc.
you're just better off doing it from within the normal .php and assigning it there.
Rob
So are you saying I an do this?
{php}$country_name{/php}
If this is the wrong syntax, could you give me a working example?
Thanks much,
Eric
you use real php within the tags and then assign your values for 'outside use' (aka smarty)
I'd like to see some effort in you trying to learn it. If i did it, I'm sure you can too.
Rob
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.