PHP: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
=db_columns= | ==db_columns== | ||
Returns an array of | Returns an array of fieldnames for a table. | ||
=db_fetch_array= | ==db_fetch_array== | ||
====object = db_fetch_array(object1)==== | ====object = db_fetch_array(object1)==== | ||
*Description | *Description | ||
Line 25: | Line 25: | ||
</div> | </div> | ||
=db_fetch_object= | ==db_fetch_object== | ||
<div style='background-color:#F2F3F4;padding:10px'> | <div style='background-color:#F2F3F4;padding:10px'> | ||
A function for looping through the result of a SELECT query returned from [[PHP#nuRunQuery|nuRunQuery]]. | A function for looping through the result of a SELECT query returned from [[PHP#nuRunQuery|nuRunQuery]]. | ||
Line 45: | Line 45: | ||
</div> | </div> | ||
=db_fetch_row= | ==db_fetch_row== | ||
A function for looping through the result of a SELECT query returned from [[PHP#nuRunQuery|nuRunQuery]]. | A function for looping through the result of a SELECT query returned from [[PHP#nuRunQuery|nuRunQuery]]. | ||
Line 61: | Line 61: | ||
</source> | </source> | ||
=db_field_array= | ==db_field_array== | ||
A function for looping through the result from [[nuRunQuery]]. <code>$r[0]</code> | A function for looping through the result from [[nuRunQuery]]. <code>$r[0]</code> | ||
=db_num_rows= | ==db_num_rows== | ||
The number of records in the result from [[nuRunQuery]]. | The number of records in the result from [[nuRunQuery]]. | ||
=nuAddJavascript= | ==nuAddJavascript== | ||
Adds Javascript to a Form as it is built. | Adds Javascript to a Form as it is built. | ||
=nuDebug= | ==nuDebug== | ||
This function takes up to 10 parameters and creates a record in the '''Debug''' Form for testing purposes. | This function takes up to 10 parameters and creates a record in the '''Debug''' Form for testing purposes. | ||
=nuDisplayError= | ==nuDisplayError== | ||
This adds an error that will stop the current event running and display the error message. | This adds an error that will stop the current event running and display the error message. | ||
=nuDisplayMessage= | ==nuDisplayMessage== | ||
This adds a message that will be displayed after the current event completes. | This adds a message that will be displayed after the current event completes. | ||
=nuGetUserAccess= | ==nuGetUserAccess== | ||
Returns an array of user information. | Returns an array of user information. | ||
=nuHasNewRecordID= | ==nuHasNewRecordID== | ||
Returns true or false. | Returns true or false. | ||
=nuID= | ==nuID== | ||
Creates a random string. | Creates a random string. | ||
=nuIsGlobeadmin= | ==nuIsGlobeadmin== | ||
Returns true or false. | Returns true or false. | ||
=nuRemoveNonCharacters= | ==nuRemoveNonCharacters== | ||
=nuRunPHP= | ==nuRunPHP== | ||
Run a Procedure. | Run a Procedure. | ||
=nuRunPHPHidden= | ==nuRunPHPHidden== | ||
Run a Procedure. | Run a Procedure. | ||
=nuRunQuery= | ==nuRunQuery== | ||
Run an SQL query. | Run an SQL query. | ||
=nuSetFormValue= | ==nuSetFormValue== | ||
Updates Objects after a Lookup value is chosen. | Updates Objects after a Lookup value is chosen. | ||
=nuSubformObject= | ==nuSubformObject== | ||
Returns a PHP object that can be looped through. | Returns a PHP object that can be looped through. | ||
=nuTT= | ==nuTT== | ||
Creates a unique ID starting with '__'. | Creates a unique ID starting with '__'. |
Revision as of 23:32, 9 July 2017
db_columns
Returns an array of fieldnames for a table.
db_fetch_array
object = db_fetch_array(object1)
- Description
A function for looping through the result of a SELECT query returned from nuRunQuery.
- Example
<source lang="php">
$s = "SELECT * FROM customer"; $t = nuRunQuery($s);
while($r = db_fetch_array($t)){
nuDebug('The field value is : ' . $r['cus_name']);
}
</source>
- Result
[0] : The field value is : Bob
db_fetch_object
A function for looping through the result of a SELECT query returned from nuRunQuery.
- Example
<source lang="php">
$s = "SELECT * FROM customer"; $t = nuRunQuery($s);
while($r = db_fetch_array($t)){
nuDebug('The field value is : ' . $r->cus_name);
}
</source>
- Result
[0] = The field value is : Bob
db_fetch_row
A function for looping through the result of a SELECT query returned from nuRunQuery.
<source lang="php">
$s = "SELECT * FROM customer"; $t = nuRunQuery($s);
while($r = db_fetch_row($t)){
nuDebug('The field value is : ' . $r[0]);
}
</source>
db_field_array
A function for looping through the result from nuRunQuery. $r[0]
db_num_rows
The number of records in the result from nuRunQuery.
nuAddJavascript
Adds Javascript to a Form as it is built.
nuDebug
This function takes up to 10 parameters and creates a record in the Debug Form for testing purposes.
nuDisplayError
This adds an error that will stop the current event running and display the error message.
nuDisplayMessage
This adds a message that will be displayed after the current event completes.
nuGetUserAccess
Returns an array of user information.
nuHasNewRecordID
Returns true or false.
nuID
Creates a random string.
nuIsGlobeadmin
Returns true or false.
nuRemoveNonCharacters
nuRunPHP
Run a Procedure.
nuRunPHPHidden
Run a Procedure.
nuRunQuery
Run an SQL query.
nuSetFormValue
Updates Objects after a Lookup value is chosen.
nuSubformObject
Returns a PHP object that can be looped through.
nuTT
Creates a unique ID starting with '__'.