how to select where month in mysql and php? -
how select month in mysql , php ?
select * `mytable` insert_date=month($_post['month']);
type insert_date = datetime
here code input post month:
<select name="month"> <option value="" selected>choose month :</option> <option value="1">january</option> <option value="2">february</option> <option value="3">maret</option> <option value="4">april</option> <option value="5">mei</option> <option value="6">juny</option> <option value="7">july</option> <option value="8">augustus</option> <option value="9">september</option> <option value="10">oktober</option> <option value="11">november</option> <option value="12">desember</option> </select>
query should this
select * mytable month(insert_date)=$_post['month'];
Comments
Post a Comment