Quantcast
Viewing all articles
Browse latest Browse all 82031

accessing editor.php to add a variable to the WHERE clause

Hi All
Ok, I now mastered the WHERE statement in the Datatables server_processing.php
I can open a new table, in a new page or new browser window with something like this:
filter_server_side_f.php?field=$_GET["field"]

To do this, I changed the html extention to php so I can pass whatever values I want to this page using:
Hi All
Ok, I now mastered the WHERE statement in the Datatables server_processing.php
I can open a new table, in a new page or new browser window with something like this:
filter_server_side_f.php?field=$_GET["field"]

To do this, I changed the html extention to php so I can pass whatever values I want to this page using:
.../serverpage.php?field=$value
so on the html(now php) page, I wouls have
"ajaxUrl": "php/browsers3t.php?stage=\"$stage\"",

on the server side page, it looks like this:
$sQuery = "
    SELECT SQL_CALC_FOUND_ROWS id,  ".str_replace(" , ", " ", implode(", ", $aColumns))."
    FROM $sTable
   WHERE stage = '" . $_GET['stage'] . "'
    $sOrder
    $sLimit
";
I could then draw a table displaying only the required data (filtered).
I got that part to work very well for me.
However, it is still a 2 phase action. How can I shorten this to get to the Editor direct from my GET link
I noted that it is possible to assign a field/value to the WHERE close in Editor.php
here is the thread:
http://datatables.net/forums/discussion/11398/where-using-editor/p1[/quote]


here is my question:
because DT uses aliases for Editor.php, how can I pass a value to that specific section in editor.php:
I would like to do this:
$query->where( "stage", "$stage" );

where $stage is past on from the url specified in my html(now php) page

I hope that makes some sense to someone?

Viewing all articles
Browse latest Browse all 82031

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>