Thursday, 13 April 2017

curl tuttorial

http://www.web-technology-experts-notes.in/2015/04/php-interview-questions-and-answers-for-2-year-experience.html

ajax call example

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#save").click(function(e){
e.preventDefault();
alert("hi");
var title=$("#title").val();
var desc=$("#title_desc").val();

var dataString = 'title='+ title + '&desc='+ desc;
$.ajax({
url:'http://localhost/CodeIgniter-3.1.0/index.php/welcome/showData',
type:'POST',
data:dataString,
success:function (response){
debugger;
alert("res");
}
});
});
});
</script>

Tuesday, 11 April 2017

use html engine in node js

http://www.makebetterthings.com/node-js/how-to-use-html-with-express-node-js/

Friday, 7 April 2017

how to get nth highest salary in mysql

select price from (select  price  from products order by price desc LIMIT 1) result order by price LIMIT 1

Thursday, 6 April 2017

how to get json data string in php

http://stackoverflow.com/questions/26825235/how-to-get-json-data-with-php

7down voteaccepted
Assuming $data contains what was returned from the server, you do:
$object = json_decode($data);
$last = $object->last;
or:
$array = json_decode($data, true);
$last = $array['last'];
When you leave out the second argument to json_decode, it returns an object, and you access the part you want as an object property. If you give the second argument true, it returns an associative array, and you access the element using array notation.

facebok php sdk

https://code.tutsplus.com/tutorials/wrangling-with-the-facebook-graph-api--net-23059