PHP script SELECT FROM mysql database WHERE date
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

PHP script SELECT FROM mysql database WHERE date

From: pizzy <JohnMPadilla@gmail.com>
Date: Fri Sep 30 2005 - 03:28:00 CEST

Problem:

I am trying to develope my personal site to select from my mysql
database and organize data on the page so that it will display all the
submissions for that day, then break and display the next day, then
break and display the third day, etc...

Question:

Should I query the whole database into an array and then sort with php?
Example: SELECT * FROM pictures

Or should I (and I would prefer) query an array with the dates I need?
Example: SELECT * FROM pictures WHERE date = $array[$i]

Can you provide an example of how the php script would look? I am
looking for some types of special functions I might be missing from php
or mysql.

Any help will be greatly appreciated.

Thanks,

pizzy
Received on Mon Oct 24 02:10:12 2005