PHP Classes

$_GET

Recommend this page to a friend!

      Eyesis Data Grid Control  >  All threads  >  $_GET  >  (Un) Subscribe thread alerts  
Subject:$_GET
Summary:I need to call the grid like mygrid.php?ID=123
Messages:3
Author:Michael Schmücker
Date:2009-10-02 19:24:44
Update:2009-10-13 09:37:40
 

  1. $_GET   Reply   Report abuse  
Picture of Michael Schmücker Michael Schmücker - 2009-10-02 19:24:44
I have a problem.
I have to call my grid from another grid and use the var as a parameter in my query.

i have this query:
$x->setQuery("NAME1,NAME2,CUSTCODE","CUSTINDU",'RECNO',"INDUCODE = 10941");

what i want is like this:
Ex1:
$ID1 = sprintf("INDUCODE = '%s'",mysql_real_escape_string($_GET[induid]));
Print $ID1;
$x->setQuery("NAME1,NAME2,CUSTCODE","CUSTINDU",'RECNO',"INDUCODE = ".$ID);

if i print the var then it is printed 2 time ???
First it has the right value, next is has '';

for my it seems that the file is loaded to times???
Ex2:

$ID1 = sprintf("INDUCODE = '%s'",mysql_real_escape_string($_GET[induid]));
$x->setQuery("NAME1,NAME2,CUSTCODE","CUSTINDU",'RECNO',"INDUCODE = ".sprintf("INDUCODE = '%s'",mysql_real_escape_string($_GET[induid])));


I must say I am NOT a super PHP guy, but I am not complete green, have worked with c++,pascal,cobol for many years.

if anyone has tried to call a grid with a parameter, let me see please...

Regards
Michael

  2. Re: $_GET   Reply   Report abuse  
Picture of Michael Schmücker Michael Schmücker - 2009-10-03 09:15:06 - In reply to message 1 from Michael Schmücker
OK got a way rund it!!

I removed EyeDataGrid::useAjaxTable(); then it works??????

When you use Ajax it seams that the file is loaded 2 times!!

Some day i will learn!!

  3. Re: $_GET   Reply   Report abuse  
Picture of Tony Iha Kazungu Tony Iha Kazungu - 2009-10-13 09:37:41 - In reply to message 2 from Michael Schmücker
Hi,
That's some way round it, but have you considered that by doing so you loose the AJAX capability of the form and the whole form gets reloaded for each and every function you do.