Tidbit Tuesday on PHP: Simple MySQL Database Insert Function
This builds on a function I did last week: db_query(). You can send any array straight to a MySQL database and it’ll even check to make sure the column actually exists. Oh, and it returns the id of the record you just added in case you needed it.
<?php
function db_array_insert($cfg_array, $table, $array) [...]
Tidbit Tuesday on PHP: Simple MySQL Database Query Function
It’s always great to create functions for those things you do a lot. Probably the single most common function I execute is database calls.
Here is a simple script for hitting up your MySQL database with a query:
<?php
if(!function_exists(dbQuery)) {
function db_query($cfg_array, $query) {
[...]
Tidbit Tuesday on PHP: Holiday Notices for Business Sites
This is a handy script for managing an out of office message on your website. I find this very useful on business websites when you’re tired of making that one little change to let people know when the office will be shut down. With about 15 minutes of extra work, you only need to do [...]
PHP Function Friday: function
So, I’ve decided to start including a new post every Friday – kind of as a discipline thing. I’m going to write a post on a PHP function every Friday. I’m not just going to regurgitate the post in the official PHP manual, but I’m going to list my experience with it along [...]
Pathfinding in PHP
I’ve been playing around with doing some A* pathfinding scripts. I was looking around on the web and didn’t find any anywhere, so I decided to make my own rudimentary one. I’m going to be expounding on this later. I thought about looking into the A* method and a few others. Feel free to take [...]
Subscribe
Facebook
Twitter
Digg
Sphinn
LinkedIn