Problem : replacing of variable with it's value in a string(query)
| From: | Bobby Singh | Date: | Fri, 16 Jun 2000 09:45:48 +0000 |
| Subject: | Problem : replacing of variable with it's value in a string(query) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-2057@lists.php.net to get a copy of this message | ||
I have my sql-queries saved in a database. Every time I want to run a query
I fetch the desired query from the db. It runs fine. The problem is when the
query is dynamic. Here is one of my queries.
SELECT * FROM DataTypes WHERE type = '$type'
I would like the variable to be replaced with its value before the query is
executed. How do I do that it. I have tried the query with both the single,
double and no quotes. No luck!
!! Help me out !!
Bob