
 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