I guess you can't get around having a client ID.
https://github.com/PHPMailer/PHPMailer/ ... th-XOAUTH2
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
update and read values from browse subform, from checkboxes
-
- Posts: 12
- Joined: Sun Jan 13, 2019 9:11 pm
Re: update and read values from browse subform, from checkbo
(The email admin says the setting is set on the google my account pages. So I need to find a way to php email with OAuth. Sigh.)
An additional issue that I have is that my iFrame has parent_name, child_name, and email_1 as form columns.
When a search is completed, and no text has been put in the iframe's Search box, there is a default search appended to my query:
(from nuDebug)
The last line nuBuilder added to my search.
If I put in a search term in the search field in the bar in the iFrame (such as "Z"), I get this appended instead:
So, LIKE "%Text%" if the search field is set, and NOT LIKE "%1%" if the search field is not set.
Is there a way to change this behavior?
It is eliminating records with emails that have a '1' in them (31 active patients
)
Richard F.
An additional issue that I have is that my iFrame has parent_name, child_name, and email_1 as form columns.
When a search is completed, and no text has been put in the iframe's Search box, there is a default search appended to my query:
(from nuDebug)
Code: Select all
[personbrowseiframeSQLML] => SELECT submission_id,child_name,parent_name,email_1
from patient_v
WHERE (child_name LIKE \"%%\") AND (parent_name LIKE \"%%\") AND ( (\"\" IS NOT NULL)
...
AND ( (CONVERT(child_name USING utf8) NOT LIKE \"%1%\" AND CONVERT(parent_name USING utf8) NOT LIKE \"%1%\" AND CONVERT(email_1 USING utf8) NOT LIKE \"%1%\") )
If I put in a search term in the search field in the bar in the iFrame (such as "Z"), I get this appended instead:
Code: Select all
AND (CONVERT(child_name USING utf8) LIKE \"%Z%\" OR CONVERT(parent_name USING utf8) LIKE \"%Z%\" OR CONVERT(email_1 USING utf8) LIKE \"%Z%\") )
Is there a way to change this behavior?
It is eliminating records with emails that have a '1' in them (31 active patients

Richard F.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 12
- Joined: Sun Jan 13, 2019 9:11 pm
Re: update and read values from browse subform, from checkbo
The iFrame was designed with a Browse SQL code that starts with SELECT * FROM...
When the SQL code is grabbed from the iFrame with the
Would it be easier to use nuRunQuery(<SQL Code>); rather than try to sort out the odd NOT LIKE "%1%" thing?
Would I need to use nuProcedure the convert the SQL code with has tags into SQL code with values?
There has to be a way forward, somehow.
Richard F.
When the SQL code is grabbed from the iFrame with the
code, not only is thevar sql =$("#patient_browse_iframe")[0].contentWindow.nuCurrentProperties().browse_sql
appended, the SELECT is changed toparent_name NOT LIKE "%1%" AND child name NOT LIKE "%1%" and email_1 NOT LIKE "%1%"
I was thinking if I removed the email field, then the odd NOT LIKE "%1%" thing would not affect things. But the result is that I don't get the email field at all, since it does not get selected.SELECT parent_name, child_name, email_1 FROM...
Would it be easier to use nuRunQuery(<SQL Code>); rather than try to sort out the odd NOT LIKE "%1%" thing?
Would I need to use nuProcedure the convert the SQL code with has tags into SQL code with values?
There has to be a way forward, somehow.
Richard F.
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 446 times
- Contact:
Re: update and read values from browse subform, from checkbo
You could copy your used browse SQL into a PHP procedure and execute it there. The hash cookies should also be automatically replaced by values.
Code: Select all
$sql = "
SELECT * from persons
WHERE (('#q_child#' IS NOT NULL) AND (child_name LIKE '%#q_child#%'))
AND (('#q_parent#' IS NOT NULL) AND (parent_name LIKE '%#q_parent#%'))
AND ( ('#q_condition#' IS NOT NULL)
AND ( (condition_1 LIKE '%#q_condition#%')
OR (condition_2 LIKE '%#q_condition#%') ) )
/* This selected for people who had appointments on multiple days
AND ( wed = 1 OR ( '#q_wed#' = 0 AND wed = 0 ) )
AND ( thurs = 1 OR ( '#q_thurs#' = 0 AND thurs = 0 ) )
AND ( fri = 1 OR ( '#q_fri#' = 0 AND fri = 0 ) )
*/
AND ( ('#q_wed#' = 0 AND '#q_thurs#' = 0 AND '#q_fri#' = 0)
OR ('#q_wed#' = 1 AND wed = 1)
OR ('#q_thurs#' = 1 AND thurs = 1)
OR ('#q_fri#' = 1 AND fri = 1)
)
AND ( ('#q_clinic#' = 0 AND '#q_grtherapy#' = 0 AND '#q_otherclinic#' = 0 )
OR ('#q_clinic#' = 1 AND pr_clinic = 1)
OR ('#q_grtherapy#' = 1 AND pr_grtherapy = 1)
OR ('#q_otherclinic#' = 1 AND pr_otherclinic = 1)
)
";
var $q = nuRunQuery($sql);