<a href="https://github.com/indyarmy/MDW" rel="nofollow">https://github.com/indyarmy/MDW</a><p>This has the limitation of not being able to chain queries via OOP, but does use PDO and is tested enough to be considered stable.
Ok.. constructive criticism here... not trolling...<p>A) Not a class. Who writes non-oop PHP anymore?
B) Globals. Seriously? What if I need 2 connections in a page load? This won't work.
C) Use PDO.<p>I see the value of the exercise, and I applaude you for it, but PDO has TRILLIONS of sql queries under its belt.<p>You should use PDO.
Couple other issues with this, which make it not very useful... for one thing, SELECT * is notoriously slow compared with selecting just the columns you want, and your select wrapper doesn't allow for joins which makes it less robust. Plus there's no way this can handle subqueries or anything like that obviously, so it's not really uh, useful.<p>More critically, you're using a lot of addslashes, which is not a safe way to escape input. You need to use mysql_real_escape_string or you're open to injection attacks.