Added a safety check @todo
This commit is contained in:
parent
d39feb1dfc
commit
187c197209
1
plt.php
1
plt.php
@ -11,6 +11,7 @@ function processAllTheActiveTables() {
|
|||||||
extract($activeTable);
|
extract($activeTable);
|
||||||
echo "Found Table : ".greenText($Name)."\n";
|
echo "Found Table : ".greenText($Name)."\n";
|
||||||
echo "Scanning all the rows in table $Name that need to be ran through trigger code:\n";
|
echo "Scanning all the rows in table $Name that need to be ran through trigger code:\n";
|
||||||
|
// @todo: check if the table has a column called : LastUpdated. If try to auto-create it. (ALTER TABLE ... LastUpdated DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP)
|
||||||
foreach(sql("SELECT * FROM $Name WHERE LastUpdated > '$LastUpdated'") as $unprocessedRow) {
|
foreach(sql("SELECT * FROM $Name WHERE LastUpdated > '$LastUpdated'") as $unprocessedRow) {
|
||||||
echo "Found row\n".json_encode($unprocessedRow)."\n";
|
echo "Found row\n".json_encode($unprocessedRow)."\n";
|
||||||
$functionName = "handleNew".str_replace(".","__",$activeTable["Name"])."Row";
|
$functionName = "handleNew".str_replace(".","__",$activeTable["Name"])."Row";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user