This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Run query
#1
Hi,

how can I successfully run such query on LM? I don't have any visfloors yet, and I don't have also no error after executing this command but it not works.

Code:
res = db:execute([[
INSERT INTO visfloors (`id`, `building`, `layout`, `type`, `sortorder`, `name`, `background`, `background_add`, `bgcolor`, `touch_bgcolor`, `bgrepeat`, `bgfixed`, `usermode_param`, `touch_param`, `width`, `height`, `locx`, `locy`, `pincode`) VALUES
(`1`, `1`, `8`, ``, `1`, `0.00_Witaj`, ``, `0_00_Witaj.svg`, ``, ``, `0`, `0`, ``, ``, `1024`, `748`, ``, ``, ``),
(`2`, `1`, `424`, ``, `56`, `1.01_Klatka schodowa`, ``, `1_01_Klatkaschodowa.svg`, ``, ``, `1`, `0`, ``, ``, `1024`, `748`, ``, ``, ``)
]])

-- res: nil

I know that probably I can use db:insert() but as I checked yesterday it only works for one row not many.

SOLVED: I've changed `` with "" and used integers where it is possible
Done is better than perfect
Reply


Messages In This Thread
Run query - by buuuudzik - 19.07.2020, 20:56
RE: Run query - by buuuudzik - 19.07.2020, 22:00
RE: Run query - by admin - 20.07.2020, 06:16
RE: Run query - by buuuudzik - 20.07.2020, 08:09
RE: Run query - by admin - 20.07.2020, 08:12
RE: Run query - by buuuudzik - 20.07.2020, 08:23

Forum Jump: