Jump to content
Sign in to follow this  

Convert simple Inline Code to dynamic (Take Value from the Db)

Recommended Posts

Hello Everybody ...short question:

My Inline code looks as follow:
$cashondelivery_cost = "0.50";
I want to convert this to dynamic, I mean I want to get the value "0.50" from the Db.

The value "0.50" is stored on table "configuration" row called "configuration_value" of the key "CASHONDELIVERY"

Code shown like this but I can not get anything:
$cashondelivery_cost = tep_db_query("SELECT configuration_value from configuration where configuration_key='CASHONDELIVERY' ");

Any Help :-)

Edited by Pelvis

Share this post

Link to post
Share on other sites

Anything in the configuration table is "auto loaded" ready to use, so you can just reference the configuration_key directly to get the value of it.

Help shape the future of Phoenix; join the Phoenix Club

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this