From 1cfb3dfa1f9a3a827bb674e5d3becbc6dbf7d780 Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 6 Oct 2008 16:19:40 -0700 Subject: Consolidating foreign key system by enhancing restrictions with tablenames. --- lib/dblib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dblib.lua b/lib/dblib.lua index ffd93e6..7043a2d 100644 --- a/lib/dblib.lua +++ b/lib/dblib.lua @@ -566,7 +566,7 @@ _luadb = { end if type(expr) == "string" or type(expr) == "number" then - return "`" .. field .. "` " .. op .. ' "' .. t._.db.sql_escape(expr) .. '"' + return r._.tbl._.tname ".`" .. field .. "` " .. op .. ' "' .. t._.db.sql_escape(expr) .. '"' elseif type(expr) == "table" then error("Complex queries not handled for now") else -- cgit v1.2.3