Welcome To Snipplr
Everyone's Recent Snippets Tagged mysql
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Simple but utilitarian function returns a numeric array of associative arrays containing an entire result set.
1
702
posted 16 years ago by sorehead
This function first checks to see if PHP is set to automagically quote stuff. If it is, we first strip pre-quoted stuff, then (assuming our text isn't numeric), we properly quote everything.
A good bit of room for improvement here, but at the very l...
1
444
posted 16 years ago by sorehead
Select the last autoincrement index from the last inserted item in a table.
0
590
posted 16 years ago by arcturus
usage is simple:
$result = mysqli_query($query,db_conn('local')); for instance.
if written in patterns, this should probably be a singleton, but I haven't bothered converting it - feel free to comment with your modification though!
3
470
posted 16 years ago by Aeon