|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
DBI - showing number records affected
Any expert know how to code to show number of records affected during INSERT/UPDATE/DELETE statement?
currently i am using: $db = DBI->connect($strConnString, $strUsername, $strPassword); $rs = $db->prepare(qq{$strSQL}); to execute my statement. |
|
#2
|
|||
|
|||
|
$rows_affected = $db->rows;
should return what you need. |
|
#3
|
||||
|
||||
|
Note that $db->rows doesn't necessarily work with all DB drivers though.
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month |
|
#4
|
|||
|
|||
|
OK it work on my script,
I connect via perl-mysql thanks for helping. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > DBI - showing number records affected |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|