Location: PHPKode > scripts > PHPClass Generator > phpclass-generator/templates/func-getall.tpl
function getAll{keyword}()
{
    {db-func}

    $q = mysql_query( "SELECT * FROM {table-name}" )
         or die( "{class-name}::getAll{keyword}() failed, dying..." );

    for ( $i = 0; $i < mysql_num_rows( $q ); $i++ )
        $resultArray[$i] = mysql_fetch_array( $q );

    return $resultArray;
}
Return current item: PHPClass Generator