Delete mutiple image with custom trigger

I am attempting to delete multiple images associated with a record being deleted. The record has a field with the default filename, then each image has a prefix ("thumb_", "callout_", "feature_") along with this filename.
My issue is two-fold. I am attempting this with a custom trigger (on the delete record; using AFTER), but I keep getting an error message when I try to pull in the filename using tNG->getColumnValue(). The error reads:
tNG_fields.getColumnValue:
Column file is not part of the current transaction.
Here is my code:
$file = $tNG->getColumnValue('file');
deleteFileAndThumbs($file);
My second issue is in regards to the redirect after the triggers.
getPrimaryKeyValue() works just fine. Thus, if I change the image names to correspond to my record's "id" #, it will pull the ID # just fine. It will make it through my code and redirect back to the listing page. However, the images will not be deleted. If I remove the redirect, the images delete, but it just sits on this page. So I assume my issue is a result of the page redirecting before al the images are deleted. Is there a way to not allow the redirect to run until my deleteImages function is completed?
Thanks!

Ok. How about executing a SELECT inside a Custom Trigger and accessing
the resulting rows to use in PHP code also in the trigger?
Example - within the Custom Trigger execute:
$sql="SELECT * FROM table";
How do I execute it? With the regular DW code like:
mysql_select_db($database_conWV, $conWV);
$sql="SELECT * FROM table";
$result = mysql_query($sql, $conWV) or die(mysql_error());
$row_result = mysql_fetch_assoc($result);
$totalRows_result = mysql_num_rows($result);
or with some ADDT code like:
$result = $tNG->connection->execute($sql);
If I do the "ADDT" way, how do I access the rows?
$result['column'] or something?
Alec
Adobe Community Expert

Similar Messages

  • Deletes all images with same name

    Why is it impossible to simply move images from one folder to the other, rather than having to go through the lengthy and awkward process of exporting them to another folder and deleting the originals. In addition, I just had the unpleasant experience that when there are JPG copies with the same name still in the folder with the original RAW images, the JPG are also deleted.
    Image management is still a headache in LR. WQhy not use the Bridge folder structure. Why not simply pick up an image and put it in another folder?

    I guess the answer is because that is the way
    Adobe designed I/O to the DB--which is the core of LR, and as such is always talked about by them in sacrosanct terms. They did make some small changes from 1.0 to 1.1--but far short of what they should have done IMO.
    There are better ways to do things, but Adobe is very reluctant to make substantial changes to LR Library to give it the I/O functionality of Bridge or other 'browser' type applications. My guess is that it is not going to change significantly with respect to this issue any time soon.
    I simply do those functions that Bridge does better in Bridge--PS in PS, LR in LR, etc. But, I don't buy into the myth that 'one app does it all' ,so I am not in the slightest disappointed, and I use the best tools out there in different apps and combine them into an effective workflow. If you look at LR in that light, you may be less frustrated.

  • Masking images with custom shapes?

    I made a custom shape, a rounded square with 2 regular corners, I want to mask an image into that shape. Any ideas how to do this? Or how to add my shape as a shape onto pages?
    Thanks in advance!
    Linda

    Linda.h wrote:
    I made a custom shape, a rounded square with 2 regular corners, I want to mask an image into that shape. Any ideas how to do this?
    Select both the shape and the image:
    +Menu > Format > Mask with selected shape+
    Or how to add my shape as a shape onto pages?
    Can't add it to the shapes menu, just keep it in a template or a 'library' document to cut and paste.
    Peter

  • Replacing Java Cup Image with Custom Image

    Hi
    i have a Jframe for which i want to replace the java cup icon that appears at the Top Left Most corner of the bar with a image of my own.How can i do this?

    import javax.swing.*;
    public class Test extends JFrame {
        public Test() {
            java.net.URL imgURL = Test.class.getResource("icon.jpg");
            setIconImage(new ImageIcon(imgURL).getImage());
            setSize(400,400);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            setVisible(true);
        public static void main(String[] args) {
            new Test();
    }

  • Thumbnail Lightbox slideshow in Accordian starts with first image, regadless of trigger

    I created my lightbox on a separate page and it works just fine.  I placed that same lightbox inside an accordion panel.  Now (only on the first click) it doesn't matter which thumbnail I click on, the first image comes up.  If I close that image and click on another thumbnail, the right image comes up.  I need to get rid of that glitch.  Any suggestions?

    Islandpixie,
    Thanks for posting this. I've discussed this issue with our engineering team and we are able to recreate the problem you're experiencing. The problem is related to the state of the Accordian panel that holds the Thumbnail slideshow. If the slideshow/lightbox triggers are in a panel that is open on initial view, the large images (the "heroes") will display in the right order. If the slideshow  is nested in an Accordian panel that is initially closed, the first image in the slideshow will appear first regardless of which trigger thumbnail is clicked.
    The only workaround we have at this time would be to use the Lightbox Composition widget instead of the Slideshow widget. This widget does not cause the same issue with hero order, however it will be more work to setup your slideshow. It will require you to create your own thumbnails for your triggers, then associate your hero image with the trigger (whereas the Thumbnail slideshow does this automatically). Here's a brief video on working with the Lightbox composition widget: http://muse.adobe.com/video-create-a-lightbox.html
    Thanks for your patience.
    Best regards
    Corey

  • What is the diff between additive,update ,delete,reverse images

    what is the diff between additive,update ,delete,reverse images with an examples.

    Hi,
    You can read about it here:
    http://help.sap.com/saphelp_nw04/helpdata/en/84/81eb588fc211d4b2c90050da4c74dc/content.htm
    Hope this helps...

  • Help with custom cropping and known aspect Ratio's

    I would like to crop a small part of a larger image with custom / free flow dimensions to the crop and then be able to print / export at a know print friendly aspect ration. An example would be a taking a crop of one person in a couple,from a larger image. The crop is outside common aspect ratios. Can lightroom fit the image to an aspect ratio of my liking whilst maintaining everything I have cropped?
    Thank you in advance

    Clearly we can't get one aspect ratio into a different aspect ratio without either trimming bits off, or else leaving gaps.
    So the best I can suggest is: crop in Develop according to the subject content that you don't want to see.
    Then in Print, set up your print layout (or choose a print template) which contains an image cell of the desired size and shape.
    There are two ways that a photo can be put into such a cell: it can be fitted "loose" so that you always see the whole current crop, leaving white margins as required; or else it can be fitted "tight" using the Zoom to Fill checkbox. In the latter case, LR applies an additional print-only crop which forces the image that is seen, to adopt the shape of the cell. So the aspect ratio of the Develop crop, does not need to have been exact for this precise output.
    This print-only crop will only remove further bits of the photo, not put any back - unlike the Develop crop. But you can slide the image around for the best composition, in terms of what it trims off.
    Your main (Develop) crop has not been altered in any way by doing this, and can of course still be adjusted further also, which will in turn alter how the zoom-to-fill appears.
    [ edit add: The Develop crop might be made specific for a particular print shape, but does not have to be, with the above technique. Maybe one actively wants to retain the camera-original aspect, with other kinds of output in mind. In any case, page margins often mean that the actual printed area is not quite exactly the same shape as the notional page anyway - a "10x8" printed with a half-inch margin on three sides and a three-quarter inch margin on the bottom, would print 9" x 6 3/4" (which is a different shape than 10x8). And all that would need to have been worked out each time, re-cropping the main composition for each different output size, margin width, etc then re-cropping it back again to 3:2 (or whatever) for your web upload. That can be managed through presets, virtual copies, snapshots - but sounds like a lot of extra work to me. My own images are cropped for general purposes, but each one remembers its last print settings also - which places it onto a page in the needed manner.]

  • Custom Trigger after Delete not  executing

    I have a custom trigger that I want to execute after a user performs a DELETE Transaction. Here is the PHP code:
    $DB_SERVER = "somewhere.com";
    // username:
    $DB_USER = "me";
    // password:
    $DB_PASS = "password";
    // database name:
    $DB_NAME = "training";
    $sessid=$_GET['sessid'];
    $userid=$_GET['id'];
    mysql_connect($DB_SERVER, $DB_USER, $DB_PASS);
        mysql_select_db($DB_NAME);
    $sql = "DELETE FROM tms_registered where eid ='$sessid' AND uid = '$userid'";
    $sql2 = "SELECT COUNT(*) AS max FROM tms_registered WHERE eid ='$sessid'";
    $result = mysql_query( $sql2 )
            or die ( 'Unable to execute query.' );
    $max_value = mysql_result($result, $i, "max");
    $sql3 = "UPDATE tms SET cur_reg='$max_value' WHERE tmid='$sessid'";
    I have also written the trigger by declaring the variables at the top of the PHP script page and then use 'global': at the begining of the trigger:
    global $DB_SERVER, $DB_USER, $DB_PASS, $DB_NAME, $sessid, $userid;
    The trigger does not execute after the DELETE transaction. What am I doing wrong?
    TIA

    Dear Karthi & Santosh,
    Thanks for your prompt replies.
    I am already maintaining following detail in OPJF
    01     5     S     1     Production     4     Released (general)
    Dear Santosh,
    I have changed the Syst.Sts from REL to CNF and save it. Deleted the trigger point assignment and reassign it. Create new Production Order. But Now
    Trigger is not executing at the time of order creation as well as Order confirmation (CO11N).
    There are following functions available in the system:
    Release succeeding operations
    Release up to stop indicator
    Release preceeding operations
    Create order with reference
    Insert reference operation set
    Start workflow task
    and i am using "Create order with reference" is it OK, or I have to use another function.
    Please suggest.
    With thanks,
    DSC

  • Keynote crashes with custom images bullets

    Anyone had problems with custom image bullets? I am using a custom image bullet – a simple bracket set that's not supported by Keynote because it's a glyph – so I saved the image file as a png file and placed it as a custom bulllet. Now if I add a new text box (sans bullet) it automatically adds the bullet and I can't remove it. Also, if I try to copy and paste a text box it force quits Keynote even though a bullet isn't used. It seems like obviously the problem is the bullet so I've tried deleting it from all master pages and existing pages and it hasn't helped.
    I'm still using the old version of Keynote but would this be resolved in the new Keynote? I haven't read much positive about the new Keynote so I'm apprehensive.

    Hello!
    Can somebody give a hint here? We are blocked by this problem.
    Regards,
    +manuel-

  • How to render a video from image sequence with custom frame rate?

    Dear all,
    For a project i would like to create a video from 47 images with a custom frame rate. To achieve this i take the following steps in Photoshop CS6 extended:
    1) File -> Open...
    2) Select the first image and select " image sequence ". All images have the same size (1280 x 1261 px) and are numbered correctly.
    3) Click open
    4) Frame Rate: Custom 3 fps
    5) File -> Export -> Render Video... -> Render
    6) Play the video with VLC. The video shows a still image of the first image.
    If i choose a frame rate of 10 fps, then there is no problem. VLC plays the video as expected.
    Is there a other way to create a video from 47 images and choose a custom frame rate? Or what am i doing wrong?

    Seen this SO thread?
    http://stackoverflow.com/questions/6691136/how-to-convert-series-of-images-into- movie-in-ios

  • Can anyone help with a custom trigger?

    Hi - I know this is a tough one and appreciate anyone's help!
    I'm trying to create a custom trigger that confirms 2 fields belong to the same record. If they do, proceed with insert transaction.
    I have gone through the tutorial (from the old Interakt Discussion Board tutorial at http://www.interaktonline.com/Documentation/MXKollection/075000_tutorialdiscussionboard.h tm) on how to create a custom trigger that checks to see whether a duplicate message and subject exist in the table and if so, stop the insert. I have this working fine, using my own table and fields.
    Can anyone help me to change the script here to confirm that both fields belong to the same record? Here is what I have right now:
    $query = "SELECT * FROM dan_camptrans_login_familyid_confirmid WHERE family_id = ".KT_escapeForSql($tNG->getColumnValue("family_id"),$tNG->getColumnType("family_id"))." AND confirm_id = ".KT_escapeForSql($tNG->getColumnValue("familyconfirm_id"),$tNG->getColumnType("familycon firm_id"));
    $result = $tNG->connection->Execute($query);
    if(!$result) {
    $error = new tNG_error("Could not access database!",array(),array());
    return $error;
    } else {
    if($numberOfRecords = $result->recordCount()) {
    $uniqueFailed = new tNG_error("There is already a message with the same subject and content!",array(),array());
    return $uniqueFailed;
    } else {
    return NULL;
    Any help would be SUPER appreciated!
    Dan

    Thank you very much Shane for responding.
    Right now, if I fill out the form and enter any numbers in the family_id and familyconfirm_id fields that are currently NOT in the dan_camptrans_login_familyid_confirmid table, the form submits fine. If however, both fields already exist within the same record, the error is returned.
    I guess what I am looking for is the opposite. When the form is submitted, the table dan_camptrans_login_familyid_confirmid is checked. If both field entries are not within the same record, return the error.
    Basically, I am sending out a user ID and confirmation number via mail to users. When they register they need to enter in both of these numbers and only if they match the records will the registration proceed.
    The main recordset/form that this custom trigger is attached to is one for my user registration table. This custom trigger and associated table is only to confirm the user registering has the correct information to register.
    Thanks again - I hope that I am explaining this clearly.
    Dan

  • Can't delete images with adobe bridge for days , don't know how to fix this , can you please help ?

    Can't delete images with adobe bridge for days , don't know how to fix this ? Can you help please ?

    Thank you so much for sharing

  • Watch Folder to Overwrite Sequence Files? – Templated Project with Custom Images

    So I want users to be able to upload an image to my server, have it added to a video, and rendered out and served to them.  Simple right?  Maybe my workflow needs adjustment:
    I have a project saved with an image sequence render queued, and a subsequent movie file render (of the image sequence) queued and collected. (the image sequence is to utilize multi-machine rendering because of intense effects, etc.)  When a user uploads an image, the server duplicates this template-project collected folder.  The project has a placeholder image that is replaced by the user's uploaded image (into the footage folder).  The server then drops it all in a watch folder for multi-machine rendering.  The sequence renders and the movie renders just fine!  All good.
    The only PROBLEM is that when the second instance comes along, "skip existing files" is checked (by necessity to use the multi-machine function) and therefore just keeps the existing image sequence without overwriting.  Every instance of the project is just a duplicate, and so has the same target path for the image sequence.  So the subsequent movie file comes out the same as the first.
    So how can I either:
    1) force overwriting the image sequence
    2) automate unique directories for each image sequence render – without physically opening the project to specify a different target path
    -or- 3) move/delete the image sequence folder AFTER movie render, but BEFORE another watch folder render (considering multiple queued projects in the watch folder at once).
    An ideas??  Thanks!!!

    > So is there a way to automate importing the image sequence through aerender and tell it to render a movie?
    Are you familiar with post-render actions? They exist to do this kind of thing.
    Here's a relevant excerpt from After Effects Help:
    http://helpx.adobe.com/after-effects/using/basics-rendering-exporting.html#post_render_act ions
    "Use the Import & Replace Usage option to create a chain of dependent render items. For example, you can set one render item to use a watch folder and multiple computers to create a still-image sequence, and then the next render item can render a single movie file from that still-image sequence"

  • Deploying Custom Image with Answer File

    Hi everyone!
    I'm in the process of making a custom image for ~25 computers, using WAIK (no network so no MDT, WDS...). I followed Technet's "Step-by-Step: Basic Windows 7 Deployment for IT Professionals", and installed from original Win7 Ultimate Retail
    Media, with an answer file. Finally I customized that install and now have a properly set-up install, in audit mode and waiting to be generalized.
    I'd like to deploy this custom install with an answer file/configuration set, in order to auto-install some drivers and hardware-specific apps, answer typical questions, etc...
    But I must admit, I'm a bit unclear as to how to proceed from there. So I'm going to state how I understand it, and would love you to correct me where I'm wrong!
    On reference computer, run syprep /generalize /oobe /shutdown
    Boot to WinPE, capture image with ImageX
    Open the resulting custom.wim in WSIM, generate a catalog file
    Make Answer File + Configuration Set, copy them to the root of an empty UFD
    Replace the Original Win7 Media's install.wim with my custom.wim, make bootable UFD
    Deploy to other computers with the 2 UFD's
    Does that sound right to you? Am I missing something? Also, should I be running sysprep with a /unattend:xxx.xml switch (not sure how that works)?
    Bonus Question:
    I'd like to use the Answer File + Configuration Set to perform some silent installs via script. Could you point me to a relevant Technet (or 3rd party) resource for that?
    Thank you very much for reading ^^

    If you are doing the "replace install.wim" option, then you are installing using Setup. In this scenario, Setup will ignore the answer file specified in the image with the /unattend switch with Sysprep. So it would be unnecessary to prepare the
    image with that switch.
    Awesome! Thanks very much for clarifying the use of the /unattend switch with sysprep =)
    Anyways, I'd rather use an autounattend.xml in another UFD, which I can replace for any different hardware type, partition layout, etc...
    Also, the "replace install.wim" method is the only one I know. Are there others I should be aware of?
    Thanks!
    Hi,
    yes, the basic process is like what you said.
    Here is a guide which contains the video and text to tech you how to do the deployment.
    Deploy Windows 7 The Easy Way: Using WDS, MDT and AIK - Step-By-Step Video - See more at:
    http://blogs.technet.com/b/danstolts/archive/2010/03/11/deploy-windows-7-the-easy-way-using-wds-mdt-and-aik-step-by-step-video.aspx
    You could refer to this article. If you have any question about it, feel free to contact us
    Thank you very much for confirming, and for this useful resource =)
    I'll definitely give it a read once I get a proper domain up and running at the office.

  • How to fix bad line spacing with custom image bullet when displaying on iPad

    So I have a presentation with custom image bullets for a couple slides. The bullets are fine when displayed on a mac, but when I move it over to the iPad the line spacing of the bullets and the text gets further out of horizontal alignment the more lines I add. I've tried adjusting the size of the bullets larger and smaller to see if that would help but it makes no difference either way.
    I know the easiest thing is to get rid of the custom image bullets, but this issue makes no sense to me and I'd really like to solve it.
    Here's how it looks on the mac:
    Here's how it looks on the iPad (took a photo and I know it's a little warped but I've shown where the issue is occurring):

    -> press '''CTRL''' + '''0''' (zero) to '''Reset''' Zoom
    * For details, see this article -> [[How do I use Zoom?]]
    Check and tell if its working.

Maybe you are looking for

  • Is there a way to automatically import photos to a Lightroom collection?

    Hi! I'm coming from aperture (on the mac), where I used a program called hazel to automatically import photos into a project in Aperture. I'm wondering if there are similar automations for Lightroom? Thanks!

  • How good is a Macbook Pro with dual video cards for gaming?

    I've been a PC guy my whole life (aside from my iPhone which I love). My gf has been pushing me to try out a mac and considering how my PC laptops have a pretty good track record of dying on me or encountering some other problems after a year or two,

  • The XML page cannot be displayed Cannot view XML input using XSL stylesheet

    Hi Oracle Gurus, I got this error ...once i have submitted request it shows warning ..I opened output it shows the below error...i cant understand how to resolve this error...Please help me...It is PL/SQ L STORED PROCEDURE CODE... The XML page cannot

  • How to run jsp using  tomcat server?

    hai friends, i'm using jsp for my application and for that i'm using tomcat server. i was runing my jsp files like this http://localhost:8080/examples/jsp/myapp/index.jsp but instead of this i need to run my jsp files like this http://localhost:8080/

  • Getting music back from iCloud

    Put my own cd's into iTunes library and tried to then put them on my new iPod touch to no avail.  Then my purchased albums are now all in iCloud and won't play on the iPod unless I download them and 'May incur charges'.  Can anyone advise on both pro