Changeset 23 for lists/SystemListItem.php
- Timestamp:
- Oct 22, 2008, 12:54:08 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lists/SystemListItem.php
r16 r23 1 1 <?php 2 2 3 function ListSystemListItemOnAdd($Parameters) 3 class ListSystemListItem 4 4 { 5 global $Database; 5 function OnAdd($Parameters) 6 { 7 global $Database; 6 8 7 //print_r($Parameters); 8 $DbResult = $Database->query('SELECT DbDataType FROM SystemType WHERE ItemId='.$Parameters['Type'].' ORDER BY Id DESC LIMIT 1'); 9 //echo($Database->LastQuery); 10 $DbRow = $DbResult->fetch_assoc(); 11 $DbResult = $Database->query('SELECT TableName FROM SystemList WHERE ItemId='.$Parameters[$Parameters['Column']].' ORDER BY Id DESC LIMIT 1'); 12 //echo($Database->LastQuery); 13 $DbRow2 = $DbResult->fetch_assoc(); 14 $Database->query('ALTER TABLE `'.$DbRow2['TableName'].'` ADD `'.$Parameters['Name'].'` '.$DbRow['DbDataType'].' NOT NULL ;'); 15 //echo($Database->LastQuery); 9 //print_r($Parameters); 10 $DbResult = $Database->query('SELECT DbDataType FROM SystemType WHERE ItemId='.$Parameters['Type'].' ORDER BY Id DESC LIMIT 1'); 11 //echo($Database->LastQuery); 12 $DbRow = $DbResult->fetch_assoc(); 13 $DbResult = $Database->query('SELECT TableName FROM SystemList WHERE ItemId='.$Parameters[$Parameters['Column']].' ORDER BY Id DESC LIMIT 1'); 14 //echo($Database->LastQuery); 15 $DbRow2 = $DbResult->fetch_assoc(); 16 $Database->query('ALTER TABLE `'.$DbRow2['TableName'].'` ADD `'.$Parameters['Name'].'` '.$DbRow['DbDataType'].' NOT NULL ;'); 17 //echo($Database->LastQuery); 18 } 16 19 } 17 20
Note:
See TracChangeset
for help on using the changeset viewer.