Is this the most effient to do with php an mysql?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I have a table of years going from 1985 - 2008.  These years represent
the purchase year.  I have created a SQL statement that selects the
years that are available for purchase years.  For example 2006 -1985. 
Here is the SQL statement I created to produce that output.


SELECT y_id, year FROM Year WHERE year <=  extract(year from now())
ORDER BY year desc;

Is there a more efficient way to do this using more PHP and less mysql?

Thanks

Paul

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux