In: SQL
3 Nov 2009In most of the cases of web development we should play with date and time. We have to calculate between two dates and get year, months. In this tutorial I am goings to show you some of the easiest way to calculate between two dates and get year, month, day.
Mysql Date from Date return the [...]
In: SQL
24 Oct 2009In this tutorial I am going to show you very easy way to show your post Archieves. Just Writting a simple query you can create your archieve.
THE QUERY:
<?php
$query=”SELECT MONTH(fieldname)MONTH, MONTHNAME( fieldname)MONTHNAME, YEAR(fieldname )year FROM tablename GROUP BY MONTH(fieldname) , YEAR(fieldname) ORDER BY fieldname”;
//change your fieldname and tablename
$result=mysql_query($query);
while($row=mysql_fetch_array($result)){
}
?>
Now you will fetch records and above query [...]
In: SQL
17 May 2008A nice and simple way of backing up a mysql table without renaming / exporting is to create a new table with the same structure and copy across the data for the current table.
This can be done without having to copy and paste the structure of the table.
Simply replace the [NEW_TABLE] and [OLD_TABLE] markers with [...]
