Hi rambousek
I can't get LIKE to accept $USER at all.
Even with double %%
here's my code
SELECT id AS ticket, status, severity, priority, owner,
time as created, summary FROM ticket
WHERE status IN ('new', 'assigned', 'reopened') and (cc LIKE '%%$USER%%')
ORDER BY status desc
I've checked with sql forums, the sql is fine, I've tried single % signs, no
% signs, can't get it to resolve the variable.
here's my error
Report execution failed: Incorrect number of bindings supplied. The current
statement uses 0, and there are 1 supplied.
Anyone got any solutionns??
I can always save the URL to the custom query, but that will only show my
items with my username in the CC field, I need to set it up for all our
user.
Please?
rambousek wrote:
>
>
> Hi,
> sometimes I need to assign more users to one issue. I do this with
> setting owner to "user1 user2". I wanted to change the My Tickets
> reports to use this. So I changed
> owner='$USER'
> to
> owner LIKE '%%$USER%%'
>
> But I get only the error saying:
> Report execution failed: near "xrambous": syntax error
> (xrambous is my username acquired through $USER)
>
> I found that if I change $USER to some of the real usernames,
> everything is working fine.
> I'm using Trac 0.9.6.
> Is this a bug or I'm doing something wrong? Thanks for help
> Adam
>
>
> >
>
>
--
View this message in context:
http://www.nabble.com/-Trac--Using-SQL-LIKE-in-report-queries-tf2358027.html#a7028625
Sent from the Trac Users mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/trac-users
-~----------~----~----~----~------~----~------~--~---