Articles related to the keyword Class.

PHP Classes – Oblects notes

Object oriented programming logic is very usefull if you want your code to reach your imagination limits. OOP helps your code to extend easier and at the same time helps your scripts to be cleaner, reusable, and saperated according to the logic you choose. Much stuff here is taken from the official php manual paraphrased and summarized by me in an efford to create a quick guide to PHP classes and objects. Most of the examples are mine and I tried to make them playful and educational.

Continue reading “PHP Classes – Oblects notes”

0

$wpdb Class notes

WordPress Logo Symbol
Methods in the wpdb() class should not be called directly. Use the global $wpdb object instead.
$wpdb object can talk to any number of tables but only to one database.(*hyperdb)
Some of the methods in this class require from you to escape all untrusted values you incorporate.
$wpdb -> get_var(‘query’, column_offset, row_offset)
$wpdb -> get_row( ‘query’, output_type, row_offset )
$wpdb -> get_col( ‘query’, column_offset )
$wpdb -> get_results( ‘query’, output_type )
$wpdb -> insert( $table, $data, $format )
$wpdb -> replace( $table, $data, $format )
$wpdb -> update( $table, $data, $where, $format=null, $where_format=null )
$wpdb -> delete( $table, $data, $where_format=null )
$wpdb -> query( ‘query’ )
$wpdb -> get_col_info( ‘type’, offset )
$wpdb -> show_errors()
$wpdb -> hide_errors()
$wpdb -> print_error()

Continue reading “$wpdb Class notes”

0