+2
> -----Original Message-----
> From: Brent Baisley [mailto:brenttech@stripped]
> Sent: Friday, September 04, 2009 6:21 AM
> To: AndrewJames
> Cc: mysql@stripped
> Subject: Re: a better way, code technique?
>
> You should store the current user id in a session variable. Then you
> don't have to hit the database at all.
>
> There really is no short way of doing it. Normally you would create a
> function (i.e. runQuery) that you pass the query too. Then it handles
> running the query, fetching the data, error checking, etc. That way
> you don't have to rewrite the same lines every time you want to run a
> query.
>
> Brent Baisley
| 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 |