php nusoap return array
I am new to web services. I want to write a generic function in php nusoap server side which can query (fetch data from multiple tables) and return a dynamic array depending upon the results returned from mysql... Here is the server code... require_once ('../lib/nusoap.php'); $server = new soap_server; $server->register('getallbook'); function getallbook() { $conn = mysql_connect('localhost','root',''); mysql_select_db('apexinventry', $conn); $sql = "SELECT * FROM users"; $q = mysql_query($sql); while($r = mysql_fetch_array($q)){ $items[] = array('cd'=>$r['id'],'title'=>$r['userid'],'author'=>
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.