view entry

Information


Title:
slow Description:
some slow queries Posted by:
serotonin Added:
15:20:04 on Tuesday, 20th of February, 2007 Source type:
PHP Number of lines:
46 Number of hits:
10 Options:
Post change or solution to this entry
Copy URL to clipboard
Copy code to clipboard
Download as file
Related entries:

  • "slow" by serotonin

Comments:
0 (Add / View all) Last 3 comments:
There are no comments for this entry.

Source code


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
1. $q = "INSERT INTO `rebates` (`programID`,`divisionID`,`userEntryID`,`premiumID`,`rejectCodeID`,`entryDate`,`receivedDate`) 2. VALUES ($programID,$divisionID,$userEntryID,$premiumID,$rejectCodeID,'$entryDate','$receivedDate')"; 3. 4. 5. $insertQ = "INSERT INTO `rebates_comments` (`rebateID`,`userEntryID`,`comment`,`timestamp`) 6. VALUES (". $db->escape_str($rebateID).",0,'". $db->escape_str($comment)."','". 7. $db->escape_str($MSSQL_RejectDT)."')"; 8. 9. $db->query("UPDATE `rebates` SET `rejectCodeID`=0 WHERE `rebateID`=$rebateID"); 10. $db->query("UPDATE `rebates` SET `rejectCodeID`=$rejectCodeID WHERE `rebateID`=$rebateID") 11. 12. $q = "INSERT INTO `rebates_comments` (`rebateID`,`userEntryID`,`comment`,`timestamp`) 13. VALUES ($rebateID,$userEntryID,'".$db->escape_str($row['comment'])."','".date("Y-m-d ", strtotime($row['CommentDT']))."')"; 14. 15. $insertQ = "INSERT INTO `rebates_address` (`rebateID`,`addressID`,`addressTypeID`) 16. VALUES ($rebateID, $addressID,".$translate_address_type[$MSSQL_AddressDefineID].")"; 17. 18. $q = "INSERT INTO `rebates_miscfields` (`rebateID`,`miscfieldID`,`miscfieldTypeID`) VALUES ($rebateID, ".$row2['miscfieldID'].", ".$row2['miscFieldTypeID'].")"; 19. 20. $q = "INSERT INTO `products` ( `productQuantity`, `productName`, `productDescription`) 21. VALUES (".$db->escape_str($MSSQL_ProductQuantity).",'".$db->escape_str($MSSQL_ProductNumber)."','".$db->escape_str($MSSQL_Description)."')"; 22. 23. $insertQ = "INSERT INTO `rebates_products` (`rebateID`,`productID`) VALUES (".$rebateID.",".$row2['productID'].")";