[advertisement]

Interested in putting your ad here?

Blog Entry

9th September 2005
Send to twitter Send to Facebook

For my long-term gaming project, State Secrets, I had to write this gem of SQL code:

SELECT c.*,length(session_id) as online FROM characters as c LEFT JOIN users as u ON u.current_char=c.id LEFT JOIN sessions as s USING (username) WHERE u.username != "admin" ORDER BY c.savvy DESC

Even now, that double join makes my eyes bleed.

Blog archives

+ About this blog