Web Design Blog

MySQL & PHP

This is where we store some of our Web Development thoughts, tips and tricks, just because we like to share.

MySQL / PHP – Optimize MySQL Tables Script

The MySQL Optimize Table command will effectively de-fragment a mysql table; it’s useful for tables which are frequently updated and/or rows are deleted. Optimizing will will help with overall performance. I’ve quickly written a PHP script that optimizes all MySQL tables in a chosen Database. All you need to do is fill in the correct [...]

22 Apr 2011 / 0 Comments / MySQL & PHP / by Maruf

PHP / MySQL – Strip Content And Only Display Images From A MySQL Table

This is another one of those quite specific pieces of code, so I doubt many people will need it. I think the code is quite useful, so I thought i’d make a post about it. Anyways, I’m going to show you how you can pull just images out of a field in a MySQL table. [...]

20 Jun 2010 / 4 Comments / MySQL & PHP / by Maruf

PHP/MySQL- Escape All POST Or GET Variables For MySQL INSERT

I’m quickly going to demonstrate how to escape special characters in a string for all POST/GET variables safe for a MySQL INSERT query when passing values from a HTML form. So, let’s say we have a form like this on index.php: Details First Name: Surname: Email: 1 2 3 4 5 6 7 8 9 [...]

16 Feb 2010 / 2 Comments / MySQL & PHP / by Maruf

MySQL & PHP- Show Tables In Database

Someone asked me the other day how to display the existing tables in their database with a PHP script. The query itself is pretty simple, but people seem to get confused about the PHP side of it. Then again, once you look at the code, you might be surprised how easy it really is… Printing [...]

14 Nov 2008 / 5 Comments / MySQL & PHP / by Maruf
© 2012 BrightCherry :)