Web Marketing Tool
Reseller
Chris B.
GameVar
Login

GameVar


An object for adding, viewing, editing and deleting a specific game variable.
Filename: /admin/tools/WMT\SQL\Study.php
Database Table: gamevars
Extends: Result
      Extends: AbstractDatabase


GameVar PHP Methods

add($postVals) v4.23

Adds a new record. The $postVals is an array of the values for each column when adding the record. Returns 0 if fails, returns the id of the new record if success.

convertHTML($htmlContent = '') v4.23

Converts ~~ variables in the $htmlContent that is provided and returns the converted content. The title of the ~~ variables are converted by the content from the column in the database with the matching title.

deleteThis($restoreQuery = '') v4.23

Deletes the loaded record from the database. |
$restoreQuery = FOR INTERNAL USE. FOR TYPICAL USAGE LEAVE THIS BLANK. The restore query to pass along when deleting an object with dependencies.

duplicateThis($newValues = null) v4.92

Creates a duplicate record in the database of the current object and returns the id of the new record.

getDefaultTRHTML() v4.23

Returns the default html code for a tr row with all of the fields from the database in it as ~~ vars

getValue($fieldName) v4.23

Returns the value from a specific column for this record. |
$fieldName = The name of the column to get the value from.

hideAllFields() v4.23

Hides all of the columns (fields) from the database table from being returned in the results.

hideField($fieldTitle) v4.23

Hides a specific column (field) from the database table from being returned in the results.

loadValues($id) v4.23

Loads values for the record with the id specified. Returns 0 if not found, 1 if success

loadValuesWhere($whereString = 'id=1') v4.23

Loads values for the record matching the criteria specified by $whereString. If the there is more than one record returned from the query then only the first record is loaded. Returns 0 if not found, 1 if success. |
$whereString = The condition to use to filter the results. Should be mysql format.

save($postVals) v4.23

Saves the record with the new values specified in the $postVals array. |
$postVals = An array containing the values to be stored. The key of the array is used for the column name and the value of the array is the value to be stored in that column.

showAllFields() v4.23

Shows all the columns (fields) from the database table in the results that are returned.

showField($fieldTitle) v4.23

Shows a specific column (field) from the database table in the results that are returned.


Columns in the gamevars Database Table:

id    gpid    varid    value    

Code Example

Use the code below to view a record in an html page:

Use the code below to add a record:

Use the code below to delete a record:



webmarketingtool.com Webutation DMCA.com Protection Status Authorize.net GoDaddy
Valid HTML! Valid CSS!


Reseller: Chris Brevig
|
Login
(502) 225-3237