Jump to content

How do I query a datetime for the current month?


Catp00p

Recommended Posts

Almost :)

 

[php:1:135268d700]<?php

$query2 = \"SELECT count(*) FROM news WHERE author = \'$newsPosterName\' AND MONTH(posttime) = MONTH(NOW())\";

?>[/php:1:135268d700]

 

hth

 

EDIT : PS you might want to check the years are the same too

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.