| Mobile | RSS

Free Lance Website Design & PHP MYSQL Programmer

Hi my name is Mike Howey. I am a Free Lance Website Design & PHP MYSQL Programmer. I have created hundreds of websites for people for over 10 years. I am easy to work with during and after the website design process. I am a full service solution. Call me today 443 615 2977  – [...]

[ More ] December 27th, 2009 | No Comments | Posted in Website Design |

PHP SQL Count – How to count the rows

Ok this is an easy few lines of code that I always seem to forget.
 
<?php
// call your database here if not already called
// I like to use the docroot, makes the code more usable on other websites.
define(’DOCROOT’, $_SERVER['DOCUMENT_ROOT']);
require(DOCROOT.”/database.php”);
$query = “SELECT COUNT(*) FROM tablename”;
$result = mysql_query($query) or die(’Sorry, didn’t work’ . mysql_error());
$numberofresults = mysql_result($result, 0); 
 ?>
 
Now there is [...]

[ More ] December 18th, 2009 | No Comments | Posted in PHP MYSQL - Simple codes |

Getting Started with PHP

PHP is a really simple coding. Don’t get overwhelmed. You really only need to understand the basic functions to get started.  The “echo” function is PHP 101. Easy but used all the time in PHP. You can use either “print” or “echo”. They do the samething but echo is what is used by most. The [...]

[ More ] October 18th, 2009 | No Comments | Posted in PHP MYSQL - Simple codes |