Re: Question I should be able to figure out but..

2013-07-30 Thread Mike Bonner
Ty ty both!  Will check out both methods and see which is easiest for me to
grok. Much appreciated.


On Tue, Jul 30, 2013 at 10:19 AM, Chris Sheffield cmsheffi...@icloud.comwrote:

 Mike,

 See this page in the SQLite documentation
 http://www.sqlite.org/c3ref/last_insert_rowid.html. You should be able to
 call last_insert_rowID() via a Select statement in LiveCode script. That'll
 get you the rowid value, which you can then use to insert records in your
 other two tables.

 Chris



 --
 Chris Sheffield
 Read Naturally, Inc.
 www.readnaturally.com



 On Jul 30, 2013, at 10:04 AM, Mike Bonner bonnm...@gmail.com wrote:

  I have a question that should be easy to figure out but i'm having issues
  so hopefully someone can point me at a simple method.
 
  I have an sqlite database with 3 tables, 1 primary, with the other 2 as
  secondary tables that relate to the primary with an id field.
 
  The question is this.. can I create an entry in the primary as well as
  adding entries to the secondaries all in one go?  Need to create the
 main,
  use the newly created id and add the entries to the secondary tables
 using
  that id.
 
  I've done this (or similar) in the past yet can't get my noggin to pull
 out
  the info, and haven't found the right thing via google yet. (will keep
  looking for the right words to google)
 
  Any help would be appreciated.
  ___
  use-livecode mailing list
  use-livecode@lists.runrev.com
  Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
  http://lists.runrev.com/mailman/listinfo/use-livecode


 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Question I should be able to figure out but..

2013-07-30 Thread Mark Schonewille

Hi,

You might be able to create a trigger, which automatically executes 
queries when you insert specific data.


--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other 
colour spaces. http://www.color-converter.com


Buy my new book Programming LiveCode for the Real Beginner 
http://qery.us/3fi


Fill out this survey please
http://livecodebeginner.economy-x-talk.com/survey/

On 7/30/2013 18:04, Mike Bonner wrote:

I have a question that should be easy to figure out but i'm having issues
so hopefully someone can point me at a simple method.

I have an sqlite database with 3 tables, 1 primary, with the other 2 as
secondary tables that relate to the primary with an id field.

The question is this.. can I create an entry in the primary as well as
adding entries to the secondaries all in one go?  Need to create the main,
use the newly created id and add the entries to the secondary tables using
that id.

I've done this (or similar) in the past yet can't get my noggin to pull out
the info, and haven't found the right thing via google yet. (will keep
looking for the right words to google)

Any help would be appreciated.



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Question I should be able to figure out but..

2013-07-30 Thread Chris Sheffield
Mike,

See this page in the SQLite documentation 
http://www.sqlite.org/c3ref/last_insert_rowid.html. You should be able to call 
last_insert_rowID() via a Select statement in LiveCode script. That'll get you 
the rowid value, which you can then use to insert records in your other two 
tables.

Chris



--
Chris Sheffield
Read Naturally, Inc.
www.readnaturally.com



On Jul 30, 2013, at 10:04 AM, Mike Bonner bonnm...@gmail.com wrote:

 I have a question that should be easy to figure out but i'm having issues
 so hopefully someone can point me at a simple method.
 
 I have an sqlite database with 3 tables, 1 primary, with the other 2 as
 secondary tables that relate to the primary with an id field.
 
 The question is this.. can I create an entry in the primary as well as
 adding entries to the secondaries all in one go?  Need to create the main,
 use the newly created id and add the entries to the secondary tables using
 that id.
 
 I've done this (or similar) in the past yet can't get my noggin to pull out
 the info, and haven't found the right thing via google yet. (will keep
 looking for the right words to google)
 
 Any help would be appreciated.
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode