
First you need to download Zend libraries (Zend Framework 1.12.3 Minimal) from their official site.
Then copy the library folder to “Application/Libraries/” folder
$data = array(
"id" => "1",
"title" => "This my test",
"by"=>"Socheat"
);
ID | TITLE | BY
---------------------------
1 This my test1 SOCHEAT
9 This my test1 SARET
Ok, let to go:
/*Table name*/
$table = "title";
/*Data array to insert*/
$data = array(
"id" => "1",
"title" => "This my test",
"by"=>"Socheat"
);
insert($table, $data);
-Function for insert:
function insert($table, $data)
{
$keys = array();
$values = array();
foreach($data as $key => $value)
{
$keys[] = $key;
$values[] = $value;
}
$check = mysql_query("INSERT INTO $table (".implode(',',$keys).") VALUES('" . implode("', '", $values) . "')");
}
If you have already created pages and you want to apply pagination to them, it would not be a big deal.

If you want to use ZendX follow this easy steps:
Download the Full Zend Framework library, and copy Zendx from "extras" Folder to your library Folder.
Add this in bootrap
protected function _initJqueryLoad()
{
$view = new Zend_View();
//$view->addHelperPath("ZendX/JQuery/View/Helper/", "ZendX_JQuery_View_Helper");
$view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
ZendX_JQuery::enableView($view);
$view->jQuery()->addStylesheet("jquery/css/ui-lightness/jquery-ui-1.10.1.custom.css")
->setLocalPath("jquery/js/jquery-1.9.1.js")
->setUiLocalPath("jquery/js/jquery-ui-1.10.1.custom.js");
}
Add this in helper in views
$view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
and download Jquery put into public folder, please in the picture
Are they view helpers? Would someone point me to a resource describing how to build one? For example, a template of a sidebar that would be called by layout()->sidebar ?> .
Thanks.
to solve this problem by altering the base_facebook.php class in the PHP SDK and adding the curlopt to ignore the SSL verification step. See below:
and add this (public static $CURL_OPTS = array( CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 60, CURLOPT_USERAGENT => 'facebook-php-3.1',
);
CURLOPT_SSL_VERIFYPEER => false)
public static $CURL_OPTS = array( CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 60, CURLOPT_USERAGENT => 'facebook-php-3.1', CURLOPT_SSL_VERIFYPEER => false );
<?phpand set proper charset in the HTML Head section
$dbhost = 'localhost';
$dbuser = 'root';
$dbpwd = '';
$dbname = 'test';
$dbConn = mysql_connect ($dbhost, $dbuser, $dbpwd) or die ('MySQL connect failed. ' . mysql_error());
mysql_select_db($dbname) or die('Cannot select database. ' . mysql_error());
mysql_query("SET NAMES utf8");
function dbQuery($sql)
mysql_query("SET NAMES utf8"); //the main trick
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">