+2 

> -----Original Message-----
> From: Brent Baisley [mailto:brentt...@gmail.com] 
> Sent: Friday, September 04, 2009 6:21 AM
> To: AndrewJames
> Cc: mysql@lists.mysql.com
> 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


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to