|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Hello everyone
How can I retrieve the amount of changed Records on an update in MySQL-Tables? In PHP for example, ther's a function named "affected_rows()", is there something similar for ColdFusion or do we have to resolve this problem over storedprocedures. I only have to know if an update was made or not, it isn't important to know the exact amount of the affected rows. thanks a lot in advance chris.w. |
|
#2
|
|||
|
|||
|
anyone who is interested to solve that problem, I've found a solution. But the only way to get the affecte_rows, is to work with the java-native-database-driver and the cfscript-tag.
Example: URL |
|
#3
|
|||
|
|||
|
For most RDBMS's, stored procs are the best way to get data back regarding DML queries (insert, update, delete).
That said, some support getting this info back natively (SQL Server, Oracle, etc...obviously MySQL does as well) For example, you can get the id of the row just inserted from SQL Server by returning @@IDENTITY. But this is all DB-specific.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Affected Rows on Update in MySQL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|