['mysql_overrides']['load_all_records_function'] // // was specified, will call that to do the loading (which allows you to load // whatever records you want - those for the currently logged-in (WordPress) // user, for example). // // RETURNS // On SUCCESS // ARRAY $table_records // // On FAILURE // $error_message STRING // ------------------------------------------------------------------------- // ========================================================================= // Init. // ========================================================================= $ns = __NAMESPACE__ ; $fn = __FUNCTION__ ; // ------------------------------------------------------------------------- $safe_dataset_slug = htmlentities( $dataset_slug ) ; // ========================================================================= // Get $selected_datasets_dmdd... // ========================================================================= if ( ! array_key_exists( $dataset_slug , $all_application_dataset_definitions ) ) { return <<prefix variable. (If // you're developing for a version of WordPress older than 2.0, you'll // need to use the $table_prefix global variable, which is deprecated in // version 2.1)." // // ------------------------------------------------------------------------- $mysql_table_name = \greatKiwi_byFernTec_adSwapper_local_v0x1x210_basepressMysql\prepend_wordpress_table_name_prefix( $dataset_slug ) ; // ========================================================================= // Get the specified dataset's DATASET MANAGER DATASET DEFINITION... // ========================================================================= /* if ( ! array_key_exists( $dataset_slug , $all_application_dataset_definitions ) ) { return <<\( // $core_plugapp_dirs , // $all_application_dataset_definitions , // $dataset_slug , // $question_front_end , // $safe_dataset_slug , // $mysql_table_name // ) // - - - - - - - - - - - - - - - - - - - - - - - - - // Returns the records in the MySQL table associated with the specified // dataset. // // You can use this custom function to override the default // "load all records" function (which default function loads ALL the // records in the (dataset's) MySQL table. // // Maybe you want to load only those records that belong to the logged-in // (WordPress) user, for example. // // RETURNS // On SUCCESS // ARRAY $table_records // // On FAILURE // $error_message STRING // ------------------------------------------------------------------------- return $selected_datasets_dmdd['mysql_overrides']['load_all_records_function']( $core_plugapp_dirs , $all_application_dataset_definitions , $dataset_slug , $question_front_end , $safe_dataset_slug , $mysql_table_name ) ; // --------------------------------------------------------------------- } // ========================================================================= // Load all the records... // ========================================================================= // ------------------------------------------------------------------------- // \greatKiwi_byFernTec_adSwapper_local_v0x1x210_basepressMysql\ // get_zero_or_more_records( // $sql // ) // - - - - - - - - - - - - - - - - - - - - - // NOTES! // ====== // 1. The INPUT $sql should NOT be escaped. // // 2. MySQL Data Types AREN'T PRESERVED! // ---------------------------------- // In other words, something stored in the DB as a MySQL INT, WON'T // necessarily be returned as a PHP INT. It comes back as a STRING. // // I haven't checked FLOATs and TIMESTAMPS, etc. But I assume that // the same applies to them. // // Why this happens I'm not sure. But presumably, since we access // the database with the WordPress Wpdb class - it's that class's // fault. // // RETURNS // On SUCCESS // - - - - - // The 0+ records specified by the SQL string (as a PHP numeric // array of records). Eg:- // // $records = array( // 0 => array( // 'field_name_1' => , // 'field_name_2' => , // ... ... // 'field_name_N' => // ) // ... // ) // // On FAILURE // - - - - - // An error message STRING. // ------------------------------------------------------------------------- $sql = <<