Overview
Features
Download
Documentation
Community
Add-Ons & Services

Last insert id in Data & updated rows count

A general discussion forum.

Last insert id in Data & updated rows count

Postby HardRock » 10 Oct 2012, 13:50

Hello!

1. How to get last insert id from database connector?

2. How to get updated rows count after UPDATE request? execurte() function returns "0" for UPDATE statement =(
HardRock
 
Posts: 5
Joined: 10 Oct 2012, 13:46

Re: Last insert id in Data & updated rows count

Postby guenter » 10 Oct 2012, 15:56

1.
Code: Select all
   session
      << "SELECT LAST_INSERT_ID()",
      into(id),
      now;

2.
Code: Select all
   session
      << "SELECT ROW_COUNT()",
      into(count),
      now;
guenter
 
Posts: 1153
Joined: 11 Jul 2006, 16:27
Location: Austria


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron