List:General Discussion« Previous MessageNext Message »
From:Daevid Vincent Date:September 4 2009 8:11pm
Subject:RE: a better way, code technique?
View as plain text  
+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?AndrewJames4 Sep
  • AW: a better way, code technique?Majk.Skoric4 Sep
    • AW: a better way, code technique?Majk.Skoric4 Sep
  • Re: a better way, code technique?Per Jessen4 Sep
    • AW: Re: a better way, code technique?Majk.Skoric4 Sep
      • Re: AW: Re: a better way, code technique?AndrewJames4 Sep
        • AW: AW: Re: a better way, code technique?Majk.Skoric4 Sep
  • Re: a better way, code technique?Brent Baisley4 Sep
    • RE: a better way, code technique?Gavin Towey4 Sep
    • RE: a better way, code technique?Daevid Vincent4 Sep