Return to Snippet

Revision: 9247
at October 27, 2008 01:09 by jonniespratley


Initial Code
	public function getContacts()
	{
		//We must specify our vo, because we need to map correctly
		require_once( "vo/ContactVO.php" );

		$sql = mysql_query( "SELECT * FROM contacts" );

		$result = array();

		while( $cont = mysql_fetch_array( $sql ) )
		{
			//Create a new contact vo
			$contact = new ContactVO( $cont );

			//Result is a snippet
			$result[] = $contact;
		}
		//Print out the result
		return $result;
	}

Initial URL

                                

Initial Description

                                

Initial Title
PHP Getting all data with amfphp

Initial Tags
php, textmate

Initial Language
PHP