AndrewJames wrote:
> is there a better way (hopefully simpler) to code this?
>
> i want to get the user id of the logged in user to use in my next
> statement.
>
> $q1 = sprintf("SELECT uid FROM users WHERE
> users.username='$username'");
The only "improvement" I can see is:
$q1 = sprintf("SELECT uid FROM users WHERE users.username='%s'",
$username);
/Per Jessen, Zürich
| Thread |
|---|
| • a better way, code technique? | AndrewJames | 4 Sep |
| • AW: a better way, code technique? | Majk.Skoric | 4 Sep |
| • AW: a better way, code technique? | Majk.Skoric | 4 Sep |
| • Re: a better way, code technique? | Per Jessen | 4 Sep |
| • AW: Re: a better way, code technique? | Majk.Skoric | 4 Sep |
| • Re: AW: Re: a better way, code technique? | AndrewJames | 4 Sep |
| • AW: AW: Re: a better way, code technique? | Majk.Skoric | 4 Sep |
| • Re: a better way, code technique? | Brent Baisley | 4 Sep |
| • RE: a better way, code technique? | Gavin Towey | 4 Sep |
| • RE: a better way, code technique? | Daevid Vincent | 4 Sep |