From 2dbe51bd29b1a10685b2bd95e4b6a00eaf377032 Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Mon, 25 Feb 2013 17:07:53 +0100 Subject: [PATCH] sqlite is not mysql --- atom | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/atom b/atom index 8132a5e..8e70de2 100755 --- a/atom +++ b/atom @@ -261,6 +261,7 @@ Select() { ",'SQL::Select:not found'" \ ");" >&3 read -u 4 results + results="${results# = }" if ! [[ $results == "SQL::Select:not found" ]] then echo "$results" @@ -295,8 +296,9 @@ Insert() { "VALUES" \ "( $insert_values );" >&3 (( no_id )) || { - echo 'SELECT LAST_INSERT_ID();' >&3 + echo 'SELECT LAST_INSERT_ROWID();' >&3 read -u 4 results + results="${results# = }" echo "$results" } } @@ -410,6 +412,7 @@ InsertOrUpdate() { ) ) fi + results="${results# = }" echo "$results" }