472,110 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,110 software developers and data experts.

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 2777
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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.