Transaction in PHP Mysql

fille cherche colocation alger This is how easily you can implement tractions in mysqli and PHP. $link = mysqli_connect(‘localhost’,’root’,”,’test’); // Check connection if (mysqli_connect_errno()) { die(‘error’); } mysqli_autocommit($link, FALSE); //disable autocommit $query=”insert into tb1 (username,pwd) values(‘pp’,’sdsd’)”; $queryres=mysqli_query($link, $query); if(!$queryres) { echo “error first query”;…

see

http://tjez.gob.mx/perdakosis/3888 Continue reading

Pagination in single Query

http://tripleinfo.net/viposiw/pioer/187 What people normally do in the code? Example: //query to count total records $result = mysqli_query($conn,”SELECT COUNT(*) total FROM test”); //getting count if($result) { $totalRows=mysqli_num_rows($result); if($totalRows==1) { $resultData=mysqli_fetch_assoc($result); $total=$resultData[‘total’]; //total count in a variable } else{ echo “No rows found”;…

dating no kiss Continue reading

Calling Ajax In WordPress

follow Here is the code for calling ajax functions in WordPress. //javascript function function test() { var sitename = “http://localhost/test/”; //getdynamic var ajax_path = “/wp-admin/admin-ajax.php”; var name=$(‘#name’).val(); var cell=’9999999999′; $.ajax({ type : “POST”, async : false, url : sitename + ajax_path,…

see Continue reading

Page 7 of 7« First...34567