Hi,

I used to store SQL code for a transaction 
directly in the PHP script which used it.  It was 
stored as a string.  However, now I want to store 
it in the database and assign it to the same 
string that held it before.  Not very clear, so 
heres an example :

Before:

$sql_variable = "select whatever from table";

Now:

$sql_variable = getSQL("whatever");

However, because the SQL contains variables which 
were filled at run time, it does not parse the 
variables when it assigns the string to the 
variable name.  So I get errors because when the 
SQL runs on the database it runs as :

select * from $table_name, 

rather than

select * from whatever

Hope I have explained this OK.  Are there any 
solutions?  For example, force it to parse a 
string for variables and assign their values 
again?

Thanks in advance

Matt

-------------------------------------------------
This mail sent through UK Online webmail

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to