![]() |
Sergey Kornilov admin 2/2/2016 |
ListQuery and ListFetchArray fucntions serve totally different purpose. They are mostly useful when you need to display some free form data that cannot be result of SQL query i.e. list of records received from some other datasource or web service. SELECT
SELECT
$query->replaceField("newfield","userid='" . $_SESSION["UserID"] ."'");
SELECT
|
C
|
chrism author 2/3/2016 |
ListQuery and ListFetchArray fucntions serve totally different purpose. They are mostly useful when you need to display some free form data that cannot be result of SQL query i.e. list of records received from some other datasource or web service. What you looking for is replaceField function of SQLQuery object: http://xlinesoft.com/phprunner/docs/replacefield.htm Here is what needs to be done. Here is your original SQL Query as it appears on 'SQL Query' screen. SELECT
SELECT
$query->replaceField("newfield","userid='" . $_SESSION["UserID"] ."'");
SELECT
|
C
|
chrism author 2/3/2016 |
So, a followup. Suppose there's multiple userid fields, userid1 and userid2 lets say. I'd like to replace both of those fields in a query. Does this method support that? I'd like to extend this to 60-odd fields. |
![]() |
Sergey Kornilov admin 2/3/2016 |
Yes, you can do that for multiple fields. Not sure why would you have 60 different userid fields in the same table though. |
C
|
chrism author 2/4/2016 |
Yes, you can do that for multiple fields. Not sure why would you have 60 different userid fields in the same table though.
|