From: Panagiotis Atmatzidis Date: 2012-08-25T23:42:11+09:00 Subject: SQLite3 retrieve id value always [] (nill) Hello, I want to add an entry to an SQLite3 table and then retrieve the 'id' value which is the value of the "primary key" define in the table as: "id integer primary key". It's an unique integer (id) like '1, 2, 3...' which defines the entry. I'd like to use this entry to identify this entry in order to use it as a link to other tables. Here is my code: https://gist.github.com/3466568 However the resulting value is always "[]". It returns an empty array. Shouldn't it return a value instead? It's like if the command is execute before the begin/rescue statement. I can clearly see the entry using SQLite3 cli. Another approach would be to use the 'select' statement outside the function. This will probably work better. But why does this happen anyway? Is there a way to get the index_id at this point? Best regards Panagiotis Atmatzidis ----------------------------- Pharmacy Student at VFU email4lists: ml@convalesco.org More info: http://about.me/atmosx The wise man said: "Never argue with an idiot, he brings you down to his level and beat you with experience."