DMXzone Database Connector PHP Support Product Page

Solved

No records displayed when filtered by URL Parameter

Reported 29 Jul 2015 19:24:02
1
has this problem
29 Jul 2015 19:24:02 Justin Mitchell posted:
I'm having an issue getting any data to display when using a URL Parameter to filter the data by the column: id. It works fine in Dreamweaver using the test button, but the live page doesn't show any data.

Using LAMP.

Here's a link to the page: vendor.massif.com/read.php?id=1

There are 2 records in the database. When I change the filter to 'contains' instead of = it will always just show the first record.

Here is the header information:

<head>
<script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>
<script type="text/javascript" src="ScriptLibrary/dmxDataBindings.js"></script>
<script type="text/javascript" src="ScriptLibrary/dmxDataSet.js"></script>
<script type="text/javascript" src="ScriptLibrary/dmxDatabaseAction.js"></script>
<link rel="stylesheet" type="text/css" href="css/vendors.css">
<meta charset="utf-8">
<title>MQF-06-02 VENDOR DETAIL</title>
<script type="text/javascript">
/* dmxDataSet name "mqfsourceread5" */
jQuery.dmxDataSet(
{"id": "mqfsourceread5", "url": "dmxDatabaseSources/mqfsourceread.php", "data": {"limit": "25"}, "dataSourceType": "database", "dataType": "jsonp"}
);
/* END dmxDataSet name "mqfsourceread5" */
function dmxDatabaseActionControl(action, id) { // v1.0
if (jQuery.dmxDatabaseAction) {
var da = jQuery.dmxDatabaseAction.get(id),
args = Array.prototype.slice.call(arguments, 2);
if (da) {
da[action].apply(da, args);
}
}
}
</script>

Any help would be appreciated.

Replies

Replied 31 Jul 2015 17:36:24
31 Jul 2015 17:36:24 Justin Mitchell replied:
Is it possible that this is an issue with my apache or php config?
Replied 04 Aug 2015 10:47:42
04 Aug 2015 10:47:42 Teodor Kuduschiev replied:
Hello,
Are you sure you've uploaded ALL of the files to your server?
Replied 04 Aug 2015 15:35:50
04 Aug 2015 15:35:50 Justin Mitchell replied:
Miro found the problem. His reply below:

Hello Justin,

the data set for some reason is not created to check for a $URL param.

here is how it should look like:


{"id": "mqfsourceread5", "url": "dmxDatabaseSources/mqfsourceread.php", "data": {"id":"{{$URL.id}}", "limit": "25"}, "dataSourceType": "database", "dataType": "jsonp"}
);

For some reason the {"id":"{{$URL.id}}" wasn't populating. I had tried recreating the page from scratch, but it still didn't add that portion of the string. It is working now.

Thanks a lot!

Reply to this topic