Posted By

jonniespratley on 10/27/08


Tagged

php textmate vo amfphp


Versions (?)

PHP Getting all data with amfphp


 / Published in: PHP
 

  1. public function getContacts()
  2. {
  3. //We must specify our vo, because we need to map correctly
  4. require_once( "vo/ContactVO.php" );
  5.  
  6. $sql = mysql_query( "SELECT * FROM contacts" );
  7.  
  8. $result = array();
  9.  
  10. while( $cont = mysql_fetch_array( $sql ) )
  11. {
  12. //Create a new contact vo
  13. $contact = new ContactVO( $cont );
  14.  
  15. //Result is a snippet
  16. $result[] = $contact;
  17. }
  18. //Print out the result
  19. return $result;
  20. }

Report this snippet  

You need to login to post a comment.