- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Guys
I'm new to Intel XDK, I spent the whole day trying to access data from MySQL, just couldn't do it. Is there anyone who can help me with the steps to retrieving MySQL data?
TK
- Tags:
- HTML5
- Intel® XDK
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It depends on the programming language of your server, The Intel XDK library does not have direct interaction with the server, for example if you are using PHP in your server:
// file.php in your server
<?php $conn = mysql_connect('localhost', 'user', 'password') or die('Could not connect: ' . mysql_error()); mysql_select_db('bd', $conn); $sql = mysql_query("SELECT * from users"); echo json_encode($sql); ?>
and then in the XDK app:
intel.xdk.device.getRemoteData("http://yourserver.com/file.phpl", "GET","","success_handler","error_handler"); function success_handler (data) { alert("success: " + data); } function error_handler(data) { alert("error: " + data); }
check this link: https://software.intel.com/es-es/node/493009

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page