
ht1080z
User
Dec 18, 2011, 11:23 AM
Post #1 of 4
(1052 views)
Shortcut
|
|
remove uploaded data from database and files from server
|
Can't Post
|
|
Hello, (Using cmsb 2.13 and membership 1.06) Is any way to remove selected images from the database? i listed my section like:
list($accomRecords, $accomMetaData) = getRecords(array( 'tableName' => 'accoms', 'where' => "owner='".mysql_escape(@$CURRENT_USER['num'])."'", 'allowSearch' => false, 'loadUploads' => true, // 'debugSql' => true, )); $accomRecord = @$accomRecords[0]; // showme($accomRecord); and displayed the items like:
<?php foreach ($accomRecord['acc_photos'] as $upload): ?> <li> <a href="<?php echo $upload['urlPath'] ?>" rel="prettyPhoto"> <img src="<?php echo $upload['thumbUrlPath'] ?>"> </a> <ul class="action-list"> <li> Actions </li> <li> <a href="<?php echo $upload['urlPath'] ?>" rel="prettyPhoto">view</a> </li> <li> <a href="#">delete</a> </li> </ul> </li> <?php endforeach ?> how can i trigger and delete selected images from the 'uploads' table and remove the files from the server? i found only very few posts in the forum about this very important part and nowhere the right answer. Please advise, Karls ht1080z
|