Ok, so the title was just a teaser to get you in here. But we noble PHP coders don't need hot naked girls to have fun anyway. All we need are our keyboards and good sturdy 19" monitor, right?
Here's my question:
I'm trying to select all records from a table where the date is within the current month. Problem is, the dates are stored as UNIX timestamps. Does anyone have any ideas of how to pull this off? I know that there is a date_format command-type-thing that is usable when writing queries, but I can't seem to figure it out. I wrote this little bit of code......
$join_My = date("M y");
$result = mysql_query("SELECT * FROM members WHERE date_format(joindate, '%M %y')='$join_My' ");
echo mysql_num_rows($result);
It finds the "M y" format of the current date (i.e. May 03). I then try to compare this to my date_format of the table named "joindate" which holds a unix timestamp.
This query should echo 2, but it echos 0, without any compiler errors.
Whoever finds a solution will be given links to websites where one can find HOT NAKED GIRLS.
Thanks =)