This commit is contained in:
2016-05-19 22:13:08 +10:00
parent 9b431c6ee3
commit abd4853ff5

View File

@@ -1320,11 +1320,15 @@ function _booking_paypal_form_builder($node, &$form_state, $person, $invoiceid,
* This will be used to select which fields to import/export to/from a CSV
*/
function _booking_get_person_fields() {
$query = db_query('SHOW COLUMNS FROM {booking_person}');
$list_of_columns = new stdClass();
while ($res = db_fetch_array($query)) {
$list_of_columns->$res['Field'] = $res['Field'];
$query = db_query('SHOW COLUMNS FROM {booking_person}');
$result = $query->fetchAll();
foreach ($result as $column) {
$list_of_columns->$column['Field'] = $column['Field'];
}
watchdog('booking_debug', "<pre>Database columns for booking_person\n@info</pre>", array('@info' => print_r( $list_of_columns, true)));
return $list_of_columns;
}