Archive for the ‘SQL’ Category

MYSQL Working with Date

In: SQL

3 Nov 2009

In 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 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 [...]

A 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 [...]


  • suba: $(this).addClass("active") and $(this).removeClass("hideme") does n't seem to be working in IE7, whe [...]
  • admin: @hadi: please check your code you may have deleted one "}" bracket. [...]
  • hadi: Hi, I get this error Parse error: syntax error, unexpected $end in C:\Users\acer\Desktop\xampp\h [...]
  • SF: High resolution zoom with image tiles: http://www.ajax-zoom.com [...]
  • Alonso: It seems that I didn't post my code properly sorry about that, that was not the problem however I wa [...]
Buy Stock Flash | Buy and Sell Royalty-Free Flash effects music and video files

Free web hostingWeb hosting
Display Pagerank