Commit 2eacd213 authored by Robert Ricci's avatar Robert Ricci

Fix two bugs:

Fix a bug in enum parsing

Fix typos that were keeping MySQL errors from coming through to the
web interface.
parent 0807f0e5
...@@ -165,7 +165,7 @@ function listTables() { ...@@ -165,7 +165,7 @@ function listTables() {
if( $pTable == 0 ) { if( $pTable == 0 ) {
$msg = mysql_error(); $msg = mysql_error();
setError( "$msg" ); setError( "MySQL Error: " . $msg );
return; return;
} }
...@@ -255,7 +255,7 @@ function viewData() { ...@@ -255,7 +255,7 @@ function viewData() {
$pResult = mysql_query( $query ); $pResult = mysql_query( $query );
if ($pResult == "") { if ($pResult == "") {
setError( mysql_error() ); setError( "Mysql Error: " . mysql_error() );
return; return;
} }
...@@ -385,12 +385,11 @@ function manageData( $cmd ) { ...@@ -385,12 +385,11 @@ function manageData( $cmd ) {
} else { } else {
$cell = "<select name=c_$fieldname size=4 multiple>\n"; $cell = "<select name=c_$fieldname size=4 multiple>\n";
} }
$cell .= strtok( "'" );
while ($str = strtok( "'" ) ) { while ($str = strtok( "'" ) ) {
if ($fieldvalueraw == $str) { if ($fieldvalueraw == $str) {
$cell .= "<option selected>$str\n"; $cell .= "<option selected>$str";
} else { } else {
$cell .= "<option>$str\n"; $cell .= "<option>$str";
} }
strtok( "'" ); strtok( "'" );
} }
...@@ -445,7 +444,7 @@ function deleteData() { ...@@ -445,7 +444,7 @@ function deleteData() {
$errMsg = mysql_error(); $errMsg = mysql_error();
if ($errMsg != "") { if ($errMsg != "") {
seterror( $errmsg ); seterror( "MySQL Error: " . $errMsg );
return 0; return 0;
} }
...@@ -479,7 +478,7 @@ function manageData_submit( $cmd ) { ...@@ -479,7 +478,7 @@ function manageData_submit( $cmd ) {
$errMsg = mysql_error(); $errMsg = mysql_error();
if ($errMsg != "") { if ($errMsg != "") {
seterror( $errmsg ); seterror( "MySQL Error: " . $errMsg );
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment