jQWidgets Forums
Forum Replies Created
Viewing 3 posts - 1 through 3 (of 3 total)
-
Author
-
don’t worry found the problem – my php left a debugging message in there –> echo $_GET[DOB];
thanks
I am trying to retrieve a list of people selected by data of birth
the php<?php#Include the connect.php fileinclude('connect.php');echo $_GET[DOB];#Connect to the database//connection String//$connect = mysql_connect($hostname, $username, $password)$connect = pg_connect("host=$hostname dbname=$database port=5432 user=$username password=$password") or die ("Could not connect to server\n");if (isset($_GET[DOB])){// get data and store in a json array$query = "SELECT\n". "\"public\"pa_surname,\n". "\"public\"pa_firstname,\n". "\"public\"pa_dob\n".// "\"public\".address.ad_phone_no,\n".// "\"public\".address.ad_mobile_no\n". "FROM\n". "\"public\".patient\n". "INNER JOIN \"public\".address ON \"public\"pa_address_serial = \"public\".address.ad_serial\n". "WHERE\n". "\"public\"pa_dob = '".$_GET[DOB]."'";}$result = pg_query($connect,$query)or die('Query failed: ' . pg_last_error());$resultArray = array();while ($row = pg_fetch_array($result, null, PGSQL_ASSOC)) { $resultArray[] = $row;}echo json_encode($resultArray);?>
HI Peter
.defaultView(); is badly named its a function that formats the date to dd/mm/yyyy to pass the the php script.thats actually working. using the developer tools in chrome I can see the json reply is being created but it’s not appearing in the grid.
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)