J
|
Jane 2/16/2009 |
Hi, $strWhereClause = whereAdd($strWhereClause,"FieldName=1 or FieldName='2' or FieldName='3'"); |
S
|
sandrotab author 2/17/2009 |
Hi, Unfortunately PHPRunner do not support multiple OwnerID values. You need to implement it manually using Before SQL query event on the Events tab. To add where clause to the main SQL query use whereAdd function. Here is a sample:
|
J
|
Jane 2/18/2009 |
Hi, |
S
|
sandrotab author 2/20/2009 |
Hi, to change where clause check SecuritySQL function in the generated include/commonfunctions.php file.
|
J
|
Jane 2/20/2009 |
Hi, $ret=GetFullFieldName(GetTableOwnerID())." in (".make_db_value(GetTableOwnerID(),$ownerid).")"; |
S
|
sandrotab author 2/22/2009 |
Hi, Here is a sample:
|
S
|
sandrotab author 3/1/2009 |
Thanks Jane, the method seems to work, but how can I not apply it to the Admin, but apply only to non-Admin? Furthermore, I could use the IN (SELECT ...) Example: $ret=GetFullFieldName(GetTableOwnerID())." in ("select Zona from `abilitaz_filtro` where Codice='".db_addslashes($_SESSION["UserID"])."'"; But the system I report an error in the syntax
|
J
|
Jane 3/2/2009 |
Hi, $strwhere = ""; global $conn; $query = "SELECT Zona FROM Abilitaz_filtro WHERE utente='".$_SESSION["UserID"]."'"; $res = db_query($query, $conn); while ($row = db_fetch_numarray($res)) $strwhere.=$row["Zona"],","; $strwhere = substr($strwhere,0,-1); $strWhereClause = whereAdd($strWhereClause,"Zona in (".$strwhere.")"); |
S
|
sandrotab author 3/2/2009 |
Hi, see my changes below:
|
A
|
alang 3/2/2009 |
Try $strwhere.=$row["Zona"].","; |