kev1n wrote:How do you run the procedure?
PS: Please use code tags. they help make your code easier to read for others! (Select the your code and click the Code button in the toolbar.
Did you see my 2nd post/ update on this? Why would the debug messages not display anything when using the create table in the nurunquery? How do I make changes to the data in the temporary table?
How would I :
1. Write the for loop or while loop to get each record from the temporary table and assign the encrypted cust_SSN field to a variable?
2. Call my unencryptSSN(cust_SSN) function? to unecrypt the SSN and return it to a variable?
3. Write the UPDATE statement to put it back in the temporary table in the last4SSN field?
4. delete this temporary table AFTER the report has run?
This is great:
https://wiki.nubuilder.cloud/ ... orts#Table
It shows you how to create a temp table. But then nothing! How do I access, and/or modify what's in the temporary table once I've created it? My normal way of getting data from a table using PHP would be to use a query:
Code: Select all
$db = mysqli_connect("localhost","myusername","mypassword","mytablename");
$tcsql = "SELECT * FROM TaxCustomers";
$tcresult = mysqli_query($db,$tcsql); // (where the $db is the database to open. HOW DO I GET THE $db within nuBuilder for a temporary table???)
then I would use:
$tcmyrow = mysqli_fetch_array($tcresult, MYSQLI_ASSOC);
do {
$newssn=$tcmyrow['cust_prissn'];
$unencssn = unencryptSSN($newssn);
$s = "UPDATE #TABLE_ID# SET 'cust_prissn'=$newssn WHERE TxCust_id=$tcmyrow['TxCust_id']";
$updresult = mysqli_query($db,$s); // (where the $db is the database to open. HOW DO I GET THE $DB within nubuilder???)
} while ($tcmyrow = mysqli_fetch_array($tcresult, MYSQLI_ASSOC));
How do I do this using nuBuilder functions to access the temporary table? What functions do I use, how do I use them to access the temporary table?