Datum ophalen

Gestart doorJorzwa4 reacties39 weergaven

5 berichten · pagina 1 van 1

Jorzwa

Lid · Topicstarter

Berichten
1.644
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hallo,

Ik ben bezig met mijn site verbouwen nu loop ik weer tegen een fout aan waar ik zelf niet uit kom.

hij geeft nu aan hoelang geleden de laatste post is gestuur voorbeeld:

1 uur geleden

Maar het moet de datum / tijd worden voorbeeld:

12 juni 2011 om 13:56:06

Wie zal mij kunnen helpen?

Stukje qeury (uit de php code):

[COLOR= #0000BB]<?php
$nQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM topics WHERE last_reaction <= NOW() AND NOT type = 4 AND catid = 1 ORDER BY last_reaction DESC LIMIT 7"[/COLOR][COLOR= #007700])[/COLOR] or 

[URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$nFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$nQuery[/COLOR][COLOR= #007700])){[/COLOR]
?>


Code die ophaalt hoelang geleden het gepost is:

[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] datenl[COLOR= #007700]([/COLOR][COLOR= #0000BB]$nFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]last_reaction[/COLOR][COLOR= #007700]]);[/COLOR] ?>
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Wacht.. je zegt stukje jquery terwijl het php code is?!!
0
Jorzwa

Lid · Topicstarter

Berichten
1.644
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Naja heb er ook niet echt verstand van dit gaat om jou systeem whear. Hij geeft aan hoelang geleden er voor het laatst is gepost en ik wil daar een datum van maken.
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
gewoon $nFetch[last_reaction]
0
Jorzwa

Lid · Topicstarter

Berichten
1.644
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bedankt weer een probleem uit de wereldhypocrite
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren