89 syslog(LOG_NOTICE, $query); |
89 syslog(LOG_NOTICE, $query); |
90 $result1 = mysqli_query($connect, $query); |
90 $result1 = mysqli_query($connect, $query); |
91 } |
91 } |
92 } |
92 } |
93 |
93 |
|
94 |
|
95 /* |
|
96 * Check and update secondary_end_sg |
|
97 */ |
|
98 $query = "UPDATE products SET secondary_end_sg=fg WHERE stage > 5 AND secondary_end_sg='0';"; |
|
99 $result = mysqli_query($connect, $query); |
|
100 $changed = mysqli_affected_rows($connect); |
|
101 if ($changed > 0) { |
|
102 syslog(LOG_NOTICE, "Updated ".$changed." products with new secondary_end_sg value"); |
|
103 } |
|
104 |
|
105 |