LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-25-2009, 05:23 AM   #1
snoopy1
Member
 
Registered: Jun 2007
Posts: 44

Rep: Reputation: 15
Perl DBI: $dbh->do, returning primary key of those modified


I am an extremely modular perl based CMS system that I've been producing for a couple years.

At the moment I have to clean up some code which is to do with relations across functions. For example if one function alters a content item then a relations function enumerates through sub functions that require notification of this change.

The original function runs a sub main_Relations({}) and passes those ID's that will be changed (so I have to know them before hand). It may also pass extra data.

What would really work well is if I could have the $dbh->do() function return the primary ID of those inserted/updated/deleted both before and after the SQL exec.

I could run the relations function via these two pieces of data and parsing the table name from the SQL.

Is it possible to return these two data items?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
perl dbi:mysql shows error syntax error dbi:mysql ?? haxpak Linux - Server 4 02-26-2009 11:09 PM
perl dbi module error "error at dbi:" dbi-> connect statement mysql haxpak Linux - Newbie 1 02-25-2009 08:22 AM
Perl DBI Queries baddah Programming 1 05-13-2008 05:56 PM
Error using DBI with Perl bostonantifan Ubuntu 0 11-11-2007 01:47 PM
MySQL Perl DBI question GoTrolling Linux - Newbie 1 03-21-2007 04:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration