SELECT disappears!
SELECT disappears!
beaklesschicken
Posts: 1Questions: 0Answers: 0
I can't seem to get this to display. I'm very new to this, but I've got quite a bit figured out. this is driving me insane! The select boxes just disappear when they're double-clicked to be edited. Everything else works wonderfully...
Can anyone help me?
I have a test pages set up at http://www.beaklesschicken.com/hmr/test.php
[code]
mysql_select_db($database_connHMR, $connHMR);
$query_connList = "SELECT liquorInventory.*, liquorVendors.name as venName FROM liquorInventory INNER JOIN liquorVendors ON liquorInventory.vendorId=liquorVendors.id WHERE liquorInventory.active=true";
$connList = mysql_query($query_connList, $connHMR) or die(mysql_error());
$row_connList = mysql_fetch_assoc($connList);
$totalRows_connList = mysql_num_rows($connList);
// Load Liquor Vendor Names
mysql_select_db($database_connHMR, $connHMR);
$query_rsLoadVendors = "SELECT lv.id, lv.name FROM liquorVendors as lv";
$rsLoadVendors = mysql_query($query_rsLoadVendors, $connHMR) or die(mysql_error());
// and now encode it in json
while($row = mysql_fetch_array($rsLoadVendors))
{
$liqVend[] = array(
'id' => $row['id'],
'name' => $row['name']
);
}
$liqVend = json_encode($liqVend);
$liqVend1 = str_replace('[', '', $liqVend);
$liqVend = str_replace(']', '', $liqVend1);
// Load Liquor Inventory Types
mysql_select_db($database_connHMR, $connHMR);
$query_rsLiqInvTypes = "SELECT * FROM liquorInvTypes";
$rsLiqInvTypes = mysql_query($query_rsLiqInvTypes, $connHMR) or die(mysql_error());
// and now encode it in json
while($row = mysql_fetch_array($rsLiqInvTypes))
{
$liqTypes[] = array(
'id' => $row['name'],
'name' => $row['name']
);
}
$liqTypes = json_encode($liqTypes);
$liqTypes1 = str_replace('[', '', $liqTypes);
$liqTypes = str_replace(']', '', $liqTypes1);
?>
<!-- end #header -->
// This is for the row highlighting
$(document).ready(function() {
$('#listing').dataTable({
bPaginate: false,
bLengthChange: false,
bFilter: true,
bSort: true,
bJQueryUI: true,
width: "75%"
})
.makeEditable({
sUpdateURL: "postQueries.php",
//sAddURL: "AddData.php", //Not implemented
//sDeleteURL: "DeleteData.php", //Not implemented
aoColumns: [
null, //id column
{// Name column
indicator : 'Saving Name...',
type : 'text',
width : '100%'
},
{// Par column
indicator : 'Saving Par...',
type : 'text',
width : '25%'
},
{// Type column
data : '<?php $liqTypes; ?>',
type : 'select',
onblur : 'cancel',
submit : 'Ok'
},
{ // Vendor
data : '<?php echo $liqVend; ?>',
type : 'select',
onblur : 'cancel',
sumbit : 'Ok'
},
null, // active
null, // Added
null, // Sort
null, //Deal
null, //Pack
null, //MoQ
null //MoT
],
"callback": function( sValue, y ) {
var aPos = oTable.fnGetPosition( this );
oTable.fnUpdate( sValue, aPos[0], aPos[1] );
},
"submitdata": function ( value, settings ) {
return {
"row_id": this.parentNode.getAttribute('id'),
"column": oTable.fnGetPosition( this )[2]
};
},
"height": "14px",
} );
} );
ID
name
par
type
vendor
active
added
Sort
deal
pack
moq
mot
<?php do { ?>
<?php echo $row_connList['id']; ?>
<?php echo $row_connList['name']; ?>
<?php echo $row_connList['par']; ?>
<?php echo $row_connList['type']; ?>
<?php echo $row_connList['venName']; ?>
<?php echo $row_connList['active']; ?>
<?php echo $row_connList['dateAdded']; ?>
<?php echo $row_connList['sortId']; ?>
<?php echo $row_connList['deal']; ?>
<?php echo $row_connList['casePack']; ?>
<?php echo $row_connList['minOrderQty']; ?>
<?php echo $row_connList['minOrderType']; ?>
<?php } while ($row_connList = mysql_fetch_assoc($connList)); ?>
<!--Load the edit item screen into this modal div-->
iframe unsupported!
<!--Tool Tips-->
Minimum Order Type
This is the type of the case pack. By the case, keg, bottle, etc.
Minimum Order Quantity
When ordering this item, this will be the minimum ordered. For example, if you're counting beer, it's counted by the bottle, but ordered by the case. The MOQ would be 1 (case)
Reorder List
Click any item's sort number to reorder the list.
<!--End Tool Tips-->
<!--
var sprytooltip1 = new Spry.Widget.Tooltip("sprytooltip1", "#sprytrigger1", {useEffect:"fade"});
var sprytooltip2 = new Spry.Widget.Tooltip("sprytooltip2", "#sprytrigger2", {useEffect:"fade"});
var sprytooltip3 = new Spry.Widget.Tooltip("sprytooltip3", "#sprytrigger4", {useEffect:"fade"});
//-->
<!-- end #mainContent -->
<!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
<!-- end #container -->
<?php
mysql_free_result($connList);
?>
[/code]
Can anyone help me?
I have a test pages set up at http://www.beaklesschicken.com/hmr/test.php
[code]
mysql_select_db($database_connHMR, $connHMR);
$query_connList = "SELECT liquorInventory.*, liquorVendors.name as venName FROM liquorInventory INNER JOIN liquorVendors ON liquorInventory.vendorId=liquorVendors.id WHERE liquorInventory.active=true";
$connList = mysql_query($query_connList, $connHMR) or die(mysql_error());
$row_connList = mysql_fetch_assoc($connList);
$totalRows_connList = mysql_num_rows($connList);
// Load Liquor Vendor Names
mysql_select_db($database_connHMR, $connHMR);
$query_rsLoadVendors = "SELECT lv.id, lv.name FROM liquorVendors as lv";
$rsLoadVendors = mysql_query($query_rsLoadVendors, $connHMR) or die(mysql_error());
// and now encode it in json
while($row = mysql_fetch_array($rsLoadVendors))
{
$liqVend[] = array(
'id' => $row['id'],
'name' => $row['name']
);
}
$liqVend = json_encode($liqVend);
$liqVend1 = str_replace('[', '', $liqVend);
$liqVend = str_replace(']', '', $liqVend1);
// Load Liquor Inventory Types
mysql_select_db($database_connHMR, $connHMR);
$query_rsLiqInvTypes = "SELECT * FROM liquorInvTypes";
$rsLiqInvTypes = mysql_query($query_rsLiqInvTypes, $connHMR) or die(mysql_error());
// and now encode it in json
while($row = mysql_fetch_array($rsLiqInvTypes))
{
$liqTypes[] = array(
'id' => $row['name'],
'name' => $row['name']
);
}
$liqTypes = json_encode($liqTypes);
$liqTypes1 = str_replace('[', '', $liqTypes);
$liqTypes = str_replace(']', '', $liqTypes1);
?>
<!-- end #header -->
// This is for the row highlighting
$(document).ready(function() {
$('#listing').dataTable({
bPaginate: false,
bLengthChange: false,
bFilter: true,
bSort: true,
bJQueryUI: true,
width: "75%"
})
.makeEditable({
sUpdateURL: "postQueries.php",
//sAddURL: "AddData.php", //Not implemented
//sDeleteURL: "DeleteData.php", //Not implemented
aoColumns: [
null, //id column
{// Name column
indicator : 'Saving Name...',
type : 'text',
width : '100%'
},
{// Par column
indicator : 'Saving Par...',
type : 'text',
width : '25%'
},
{// Type column
data : '<?php $liqTypes; ?>',
type : 'select',
onblur : 'cancel',
submit : 'Ok'
},
{ // Vendor
data : '<?php echo $liqVend; ?>',
type : 'select',
onblur : 'cancel',
sumbit : 'Ok'
},
null, // active
null, // Added
null, // Sort
null, //Deal
null, //Pack
null, //MoQ
null //MoT
],
"callback": function( sValue, y ) {
var aPos = oTable.fnGetPosition( this );
oTable.fnUpdate( sValue, aPos[0], aPos[1] );
},
"submitdata": function ( value, settings ) {
return {
"row_id": this.parentNode.getAttribute('id'),
"column": oTable.fnGetPosition( this )[2]
};
},
"height": "14px",
} );
} );
ID
name
par
type
vendor
active
added
Sort
deal
pack
moq
mot
<?php do { ?>
<?php echo $row_connList['id']; ?>
<?php echo $row_connList['name']; ?>
<?php echo $row_connList['par']; ?>
<?php echo $row_connList['type']; ?>
<?php echo $row_connList['venName']; ?>
<?php echo $row_connList['active']; ?>
<?php echo $row_connList['dateAdded']; ?>
<?php echo $row_connList['sortId']; ?>
<?php echo $row_connList['deal']; ?>
<?php echo $row_connList['casePack']; ?>
<?php echo $row_connList['minOrderQty']; ?>
<?php echo $row_connList['minOrderType']; ?>
<?php } while ($row_connList = mysql_fetch_assoc($connList)); ?>
<!--Load the edit item screen into this modal div-->
iframe unsupported!
<!--Tool Tips-->
Minimum Order Type
This is the type of the case pack. By the case, keg, bottle, etc.
Minimum Order Quantity
When ordering this item, this will be the minimum ordered. For example, if you're counting beer, it's counted by the bottle, but ordered by the case. The MOQ would be 1 (case)
Reorder List
Click any item's sort number to reorder the list.
<!--End Tool Tips-->
<!--
var sprytooltip1 = new Spry.Widget.Tooltip("sprytooltip1", "#sprytrigger1", {useEffect:"fade"});
var sprytooltip2 = new Spry.Widget.Tooltip("sprytooltip2", "#sprytrigger2", {useEffect:"fade"});
var sprytooltip3 = new Spry.Widget.Tooltip("sprytooltip3", "#sprytrigger4", {useEffect:"fade"});
//-->
<!-- end #mainContent -->
<!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
<!-- end #container -->
<?php
mysql_free_result($connList);
?>
[/code]
This discussion has been closed.