|
Posted by Ike on 12/16/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
Navigation:
[Reply to this message]
|