You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$row = SQLSelectOne("SELECT * FROM " . $table_name);
306
-
if (!isset($row['LINKED_OBJECT'])) continue;
307
-
$rows = SQLSelect("SELECT * FROM $table_name WHERE LINKED_OBJECT = '" . DBSafe($rec['TITLE']) . "'");
308
-
if (isset($rows[0]['ID'])) {
309
-
$total_rows = count($rows);
310
-
for ($ir = 0; $ir < $total_rows; $ir++) {
311
-
$rows[$ir]['LINKED_OBJECT'] = '';
312
-
if (isset($rows[$ir]['LINKED_PROPERTY'])) {
313
-
$rows[$ir]['LINKED_PROPERTY'] = '';
314
-
}
315
-
if (isset($rows[$ir]['LINKED_METHOD'])) {
316
-
$rows[$ir]['LINKED_METHOD'] = '';
317
-
}
318
-
if (isset($rows[$ir]['ID'])) {
319
-
SQLUpdate($table_name, $rows[$ir]);
320
-
}
300
+
$tables = SQLSelect("SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME IN ('LINKED_OBJECT') AND TABLE_SCHEMA='" . DB_NAME . "';");
301
+
$total = count($tables);
302
+
for ($i = 0; $i < $total; $i++) {
303
+
$table_name = $tables[$i]['TABLE_NAME'];
304
+
$rows = SQLSelect("SELECT * FROM $table_name WHERE LINKED_OBJECT = '" . DBSafe($rec['TITLE']) . "'");
0 commit comments