Return to Portfolio
Return to Script

MySQL Database Class Demo

Unfortunately, there are a few functions I cannot demonstrate for you because it will pull information from or affect the data of my database. Here are a few I can demonstrate for you.

Calling a Query

1
2
$partners = $db->query('SELECT * FROM `partners` LIMIT 5;');
$db->print_table($partners);

partner_id partner url description active
1 ManaLeak.com http://www.manaleak.com/ UK Magic The Gathering superstore & tournament centre specialising in trading card game singles, boosters and gaming accessories. Y
2 Web Calendar http://www.phpjabbers.com/web-calendar/?af=940 The Flash Web Calendar is a great Flash/PHP calendar script that can be easily integrated into any web site. Y
3 Flash / XML Poll http://www.phpjabbers.com/web-poll/flash-poll-xml.php?af=940 Create a poll on your web site using a simple text editing software. See what users have to say about it. Y
4 Stars Rate http://www.phpjabbers.com/stars-rate/?af=940 A simple, yet extremely powerful voting script that can be used to poll your web site visitors. Y
5 Flash Gallery http://www.phpjabbers.com/flash-gallery/?af=940 Amazing gallery script used to dynamically display images on your web site Y

Sorting a Non-Indexed Table

1
2
3
$db->sort_nonindexed_table('anime_images',array('`extension` DESC'));
$anime_images = $db->query('SELECT * FROM `anime_images` LIMIT 5;');
$db->print_table($anime_images);

anime_id extension
15 png
1 jpg
2 jpg
3 jpg
4 jpg

463 Unique Visitors