Database

boolean = ExecuteSql(string_utf8 SQL,boolean show_error (opt))

Description
Execute action SQL
Parameters
SQL - sql string_utf8 
show_error - show error as MsgBox
Return Value
true/false - 

table or nil = GetTable(string_utf8 SQL,boolean show_error(opt))

SimpleTV ver
SimpleTV v.0.4.8 b8 or above
Description
Returns the SQL query as table
keys(name of fields) in table are ANSI string  
string values in table are UTF8 string    
Parameters
SQL - sql string_utf8 
show_error - show error as MsgBox
Return Value
on success - returns table
on error - returns nil
Sample
local t = m_simpleTV.Database.GetTable("SELECT Main.Id, Main.Name FROM Main;",true)
if t==nil then return end 
for i,w in pairs(t) do   --debug it 
for r,e in pairs(w) do 
    debug_in_file( r .. '=' .. e .. '|' ) 
end
debug_in_file('\n') 
end

RefreshChannelList(ID number(opt),UpdateIMG boolean(opt))

Moved to PlayList

SaveCurrentChannelConfig()

SimpleTV ver
SimpleTV v.0.4.8 b8 or above
Description
Save cached info of current playing channel into DB. This is necessary to prepare for changing channel info directly in DB.

LoadCurrentChannelConfig()

SimpleTV ver
SimpleTV v.0.4.8 b8 or above
Description
Load current playing channel info from DB
Зашли как: Anonymous (Anonymous)
mantis/simpletv/api/database.txt · Последние изменения: 20/10/2015 15:02 — SergeyVS
 
За исключением случаев, когда указано иное, содержимое этой вики предоставляется на условиях следующей лицензии: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki