Reply to Search & replace

Your name:

Reply:


Posted by Ike on 11/01/38 11:58

I'm absolutely stuck, hoping someone can illuminate my sitatuation. I have a
string (a query) where I need to dynamically be able to change one part of
the the string (the part where .username LIKE\'%\' ), changing the text I am
looking for .username to be LIKE, to something else that will sent over via
an HTTP Get as $_GET['username']. THat is, the quey can be ANY query,
however, if there is a .username LIKE in the query, I need to change the
value for the LIKE (which is % in this case) to be $_GET['username'].

Can someone please help me out with this? A typical query would be something
like:


$qid = mysql_query(stripslashes("SELECT t0.username AS \"Username\"
,COUNT(t1.closed) AS \"Ups Handled\" , AVG(ABS(t1.closed)) AS \"Closing
Ratio\" FROM associates t0,leads t1 WHERE (t0.branch LIKE \'%\') AND
(t1.associatekey=t0.id) AND t0.username LIKE\'%\' AND t1.date
>=\'2006-01-01%\' AND t1.date <=\'2006-12-31%\' GROUP BY
t0.username ORDER BY t0.username ASC "));

thanks, Ike

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация