[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Calling a field in the same table
- From: Brett Nash <nash@...>
- Date: Mon, 26 Apr 2010 10:04:10 +0800
On Sun, 25 Apr 2010 01:06:06 -0500
Drake Wilson <drake@begriffli.ch> wrote:
> Quoth Luciano de Souza <luchyanus@predialnet.com.br>, on 2010-04-24
> 23:17:23 -0300:
> > database =
> > {
> > filename = 'test.db',
> > connection = sqlite3.open(database.filename)
> > }
> >
> > An error shows up because I can't use "database.filename" inside
> > the table "database".
>
> The table isn't fully constructed yet. If you have specific order of
> evaluation requirements you can create the table first and then add
> entries to it one-by-one:
For what it is worth, this is a very common error, and easy to do
accidentally even when you are reasonably experienced with Lua. Having
said that it tends to be easy work out what is wrong after a little
experience.
Is is in any of the Lua FAQs? I can't see it in any of the following
witn a quick scan:
http://www.lua.org/faq.html
http://lua-users.org/wiki/LuaFaq
http://batbytes.com/luafaq/
Regards,
nash