GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

Update query gives no result but insert give result for 1 transaction

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Update query gives no result but insert give result for 1 transaction

    Dear All,
    I have 2 queries which I run under one transaction but for some rare cases the update query give no result but there is no error generated but in all cases the insert query works. Part of the logs show the queries have been posted below.

    080804 14:40:21 207 Connect root@localhost on mpcms4
    207 Query SHOW VARIABLES
    207 Query SHOW COLLATION
    207 Query SET character_set_results=NULL
    207 Init DB mpcms4
    207 Query Select tblProduct.productTotalStock, tblProduct.productBooked, tblProduct.productCode, tblProduct.productName, tblProduct.productPrice, tblProduct.rrpMarkUpType, tblProduct.rrpMarkUpFixed, tblProduct.rrpMarkUpAmount, tblProduct.rrpMarkUpPercentage, tblProduct.productTotalAmount From tblProduct Where productID=1592
    208 Connect root@localhost on mpcms4
    208 Query SHOW VARIABLES
    208 Query SHOW COLLATION
    208 Query SET character_set_results=NULL
    208 Init DB mpcms4
    208 Query SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ
    208 Query BEGIN
    208 Query Update tblProduct Set tblProduct.productBooked = tblProduct.productBooked + 1 Where tblProduct.productID=1592
    208 Query Insert into tblTempReceipt Set productType='Accessory', productID=1592, stockID ='6', stockSIQ ='1', employeeID = '9', tempReceiptTimeStamp='2008:08:04 02:40:21'
    208 Query COMMIT
    208 Quit
    207 Quit

    080804 14:51:50 214 Connect root@localhost on mpcms4
    214 Query SHOW VARIABLES
    214 Query SHOW COLLATION
    214 Query SET character_set_results=NULL
    214 Init DB mpcms4
    214 Query Select tblProduct.productTotalStock, tblProduct.productBooked, tblProduct.productCode, tblProduct.productName, tblProduct.productPrice, tblProduct.rrpMarkUpType, tblProduct.rrpMarkUpFixed, tblProduct.rrpMarkUpAmount, tblProduct.rrpMarkUpPercentage, tblProduct.productTotalAmount From tblProduct Where productID=1068
    215 Connect root@localhost on mpcms4
    215 Query SHOW VARIABLES
    215 Query SHOW COLLATION
    215 Query SET character_set_results=NULL
    215 Init DB mpcms4
    215 Query SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ
    215 Query BEGIN
    215 Query Update tblProduct Set tblProduct.productBooked = tblProduct.productBooked + 1 Where tblProduct.productID=1068
    215 Query Insert into tblTempReceipt Set productType='Accessory', productID=1068, stockID ='7', stockSIQ ='1', employeeID = '9', tempReceiptTimeStamp='2008:08:04 02:51:50'
    215 Query COMMIT
    215 Quit
    214 Quit

  • #2
    And what if during update query running there is no record with such tblProduct.productID?

    Comment


    • #3
      Dear Debug,
      I have checked and both values do exist for the productID. Any other idea please thanks.

      Comment

      Working...
      X