Posted by: ranacse05 on: July 27, 2008
Few days ago I got “Learning Facebook Application Development” from packt publication. This is an awesome book if you want to develop Facebook Application using PHP and MySQL
If you are new in PHP and MySQL you also can use this book. From the beginning to the end this book covers every ting. There are some [...]
Posted by: ranacse05 on: July 8, 2008
I was working on PHP Data Object (PDO) . But i saw that PDOstatement::rowCount() does not return row number for mysql when u use the SELECT command . Then i found this function to get the row number after a SELECT query .
<?
function getRowCount($sql)
{
$sql = trim($sql);
$sql = preg_replace(‘~^SELECT\s.*\sFROM~s’, ‘SELECT COUNT(*) FROM’,
$sql);
$sql = preg_replace(‘~ORDER\s+BY.*?$~sD’, ”, $sql);
$stmt [...]
Recent Comments