sql exception handling
This commit is contained in:
@@ -6,11 +6,20 @@
|
|||||||
|
|
||||||
function booking_admin()
|
function booking_admin()
|
||||||
{
|
{
|
||||||
|
$form = array();
|
||||||
//regenerate all our menu hooks when loading this form
|
//regenerate all our menu hooks when loading this form
|
||||||
menu_rebuild();
|
menu_rebuild();
|
||||||
|
|
||||||
//create the mysql view booking_person_view if necessary
|
//create the mysql view booking_person_view if necessary
|
||||||
$sqlview_check = db_query("SELECT 1 FROM {booking_person_view}")->fetchAssoc();
|
try {
|
||||||
|
$sqlview_check = db_query("SELECT 1 FROM {booking_person_view}")->fetchAssoc();
|
||||||
|
watchdog('booking_debug', "<pre>SQL View booking_person_view check\n@info</pre>", array('@info' => print_r( $sqlview_check, true)));
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
watchdog('booking_debug', "SQL View booking_person_view check does not exist");
|
||||||
|
_booking_node_create_mysqlview();
|
||||||
|
}
|
||||||
|
/*
|
||||||
if (! $sqlview_check) {
|
if (! $sqlview_check) {
|
||||||
watchdog('booking_debug', "SQL View booking_person_view check does not exist");
|
watchdog('booking_debug', "SQL View booking_person_view check does not exist");
|
||||||
_booking_node_create_mysqlview();
|
_booking_node_create_mysqlview();
|
||||||
@@ -18,9 +27,8 @@ function booking_admin()
|
|||||||
else {
|
else {
|
||||||
watchdog('booking_debug', "<pre>SQL View booking_person_view check\n@info</pre>", array('@info' => print_r( $sqlview_check, true)));
|
watchdog('booking_debug', "<pre>SQL View booking_person_view check\n@info</pre>", array('@info' => print_r( $sqlview_check, true)));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
$form = array();
|
|
||||||
|
|
||||||
$form['email'] = array(
|
$form['email'] = array(
|
||||||
'#type' => 'fieldset',
|
'#type' => 'fieldset',
|
||||||
'#title' => 'Email Addresses'
|
'#title' => 'Email Addresses'
|
||||||
|
Reference in New Issue
Block a user