Re[2]: Select news based on dates

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

 



Hi!
"text" is of no importance.
I work only with "date".
If it's useful, nobody can prohibit that for you.

Monday, May 17, 2004, 10:43:43 PM, Daniel wrote:

DC> ORDER BY date, text ?

>> Hi!
>> You can use "order by date" and such method:
>> <code>
>> $result = mysql_query(blablabla);
>> $date = "foo";
>> while($news = mysql_fetch_array($result)){
>>     if ($date==$news["date"]){
>>         echo "new date";
>>     }
>>     echo $news["text"];
>>     $date = $news["date"];
>> }
>>
>>
>> Monday, May 17, 2004, 3:50:04 PM, T. wrote:
>>
>> THG> Hello,
>>
>> THG> I would like to display my news like this:
>>
>> THG> *10.04.2004.*
>> THG> - news 1
>> THG> - news 2
>> THG> - news 3
>> THG> *14.04.2004.*
>> THG> - news 4
>> THG> *15.04.2004.*
>> THG> - news 5
>> THG> ...


-- 
Best regards,
Mikhail U. Petrov
mailto:mikhail@xxxxxxxx

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux