This topic is locked

about list sql

2/16/2007 10:41:02 PM
PHPRunner General questions
O
ozakipw author

I have two fields that need to accord with username for example how should I go to change the procedure yard like this in list?

select * from AM MESSAGE where F PROPOSALUSER ='username' or F _ PROCESSUSER ='username'

J
Jane 2/19/2007

Hi,
you can do it editing generated ..._list.php file.

Find these lines:

// order by

$strSQL.=" ".trim($strOrderBy);

and add following code just before:

if (strpos($strSQL,"where"))

$strSQL.= " or (F_PROPOSALUSER='".$_SESSION["UserID"]."' and F_PROCESSUSER='".$_SESSION["UserID"]."')";

else

$strSQL.= " where (F_PROPOSALUSER='".$_SESSION["UserID"]."' and F_PROCESSUSER='".$_SESSION["UserID"]."')";