$strSQL = "SELECT * FROM form where dept_id='$dept_id' ORDER BY number DESC";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
{
$row=mysql_fetch_row($objQuery);
$q = $row[2] ;
$number = $q+1;
Tag : PHP, MySQL
Date :
2011-06-13 15:44:01
By :
pumhonda
View :
804
Reply :
2
No. 1
Guest
Code (PHP)
SELECT count(*)+1 FROM form where dept_id='$dept_id' and month(now()) = month and year(now()) = year
ORDER BY number DESC