469,628 Members | 1,201 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,628 developers. It's quick & easy.

Replace variables in resulting query

Jim
Hi,

I have the results of a query that as follows. I want to replace $prod
with the value of the variable - how can I get php to do that?

Select total_errors as num from ftr_summary_data where
ftr_product_platform= $Product and Project=$Project'

Select total_errors as denom from ftr_summary_data where
ftr_product_platform= '$Product' and Project='$Project'
Jim

Jul 25 '06 #1
1 2743
I'm not sure, but this is something you may want to try.

If your query is in quotes, here is what it should look like:

"SELECT tota_errors AS num FROM ftr_summary_data WHERE
ftr_product_platform = ".$Product." AND Project = ".$Project."

I hope this helps.
Andy
Jim wrote:
Hi,

I have the results of a query that as follows. I want to replace $prod
with the value of the variable - how can I get php to do that?

Select total_errors as num from ftr_summary_data where
ftr_product_platform= $Product and Project=$Project'

Select total_errors as denom from ftr_summary_data where
ftr_product_platform= '$Product' and Project='$Project'
Jim
Jul 25 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by pembed2003 | last post: by
4 posts views Thread by Hardy Wang | last post: by
9 posts views Thread by Tony | last post: by
2 posts views Thread by Jeff Gardner | last post: by
5 posts views Thread by donet programmer | last post: by
2 posts views Thread by rjoseph | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.