473,324 Members | 2,214 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 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 2820
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: pembed2003 | last post by:
Hi all, I asked this question in the C group but no one seems to be interested in answering it. :-( Basically, I wrote a search and replace function so I can do: char source = "abcd?1234?x";...
4
by: Hardy Wang | last post by:
Hi: I have a XML like <?xml version="1.0" ?> <object> <comments>www.site.com/page.aspx?param1=value1&param2=value2</comments> </object> Since "&" is invalid in XML, I need to replace all "&"...
9
by: Tony | last post by:
Win XP Pro - access 2002 - vs 2002 - vb Can someone tell me why this doesn't work? Dim MyString as string MyString = "Winner's" Mystring.replace("'", " ") I'm trying to remove any single...
2
by: Jeff Gardner | last post by:
Greetings: I am attempting to split an input string using the str_word_count function to return multiple single word query variables. I can create an array based on...
5
by: donet programmer | last post by:
Wondering if anybody knows how to get around this problem ... I am creating a "Please wait..." page to show a friendly message to my site users while the data is being loaded. I am using...
9
by: MrHelpMe | last post by:
Hello again experts, I have successfully pulled data from an LDAP server and now what I want to do is drop the data into a database table. The following is my code that will insert the data but...
3
by: mark | last post by:
I have a table of UK companies whose records I want to filter using a map of postcode regions. For the benfit of people outside the UK, our postcodes are a pain to work with because they are not...
6
by: duke442games | last post by:
Hi Gang I am working on fixing a corrupted database (A yearly proc did not handel the conversion from year to year and now I have to fix the resulting lines in the DB). Most of my fixes I have...
2
by: rjoseph | last post by:
Hi Guys I hope this is a simple one for you. I am basically displaying data onto my xml page using the following line of code: <xsl:value-of select="carmanufacturer" /> An example of the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.