Difference between revisions of "User:Dt192"

From Mudlet
Jump to navigation Jump to search
Line 30: Line 30:
 
...
 
...
 
</pre>
 
</pre>
 +
 +
So i don't forget again. This is how you sent raw sql to the db and fetch the result
 +
<syntaxhighlight language="lua">
 +
mydb = db:create("mydb",
 +
{
 +
  mySheet = {
 +
    name = "", id = 0, city = "",
 +
    _index = { "name" },
 +
    _unique = { "id" },
 +
    _violations = "FAIL"
 +
  }
 +
})
 +
 +
myData = {
 +
  {name="Ixokai", city="Magnagora", id=1},
 +
  {name="Vadi", city="New Celest", id=2},
 +
  {name="Heiko", city="Hallifax", id=3},
 +
  {name="Keneanung", city="Hashan", id=4},
 +
  {name="Carmain", city="Mhaldor", id=5},
 +
  {name="Ixokai", city="Hallifax", id=6},
 +
}
 +
 +
db:add(mydb.mySheet, unpack(myData))
 +
 +
res = db.__conn.mydb:execute("SELECT last_insert_rowid()"):fetch()
 +
 +
display(res)
 +
</syntaxhighlight>

Revision as of 15:36, 30 January 2024

Sandbox List of orphaned pages

**Orphaned Pages**
https://wiki.mudlet.org/w/Area_51/Mapping_script
https://wiki.mudlet.org/w/Artists_performance_package
https://wiki.mudlet.org/w/Bounty_Process
https://wiki.mudlet.org/w/Chrome_OS
https://wiki.mudlet.org/w/Comparison_of_MUD_clients
https://wiki.mudlet.org/w/Connection_Window
https://wiki.mudlet.org/w/Dependency_Versions
https://wiki.mudlet.org/w/Fonts
https://wiki.mudlet.org/w/HowTo:OpenInWindowsCmd
https://wiki.mudlet.org/w/Mobile_Plan
https://wiki.mudlet.org/w/Mudlet_Packaging_System_Info_Template
https://wiki.mudlet.org/w/Mudlet_Sponsorship_Plan
https://wiki.mudlet.org/w/ProfileBackup
https://wiki.mudlet.org/w/Tutorials
https://wiki.mudlet.org/w/Updating_PPA
https://wiki.mudlet.org/w/VyzorDocumentation
https://wiki.mudlet.org/w/VyzorWalkthrough

**Links from the main website**
https://wiki.mudlet.org/w/Known_Issues

**Can't be deleted**
https://wiki.mudlet.org/w/Manual:Lua_Functions/Test

**To Delete**
...

So i don't forget again. This is how you sent raw sql to the db and fetch the result

mydb = db:create("mydb",
{
  mySheet = {
    name = "", id = 0, city = "",
    _index = { "name" },
    _unique = { "id" },
    _violations = "FAIL"
  }
})

myData = {
  {name="Ixokai", city="Magnagora", id=1},
  {name="Vadi", city="New Celest", id=2},
  {name="Heiko", city="Hallifax", id=3},
  {name="Keneanung", city="Hashan", id=4},
  {name="Carmain", city="Mhaldor", id=5},
  {name="Ixokai", city="Hallifax", id=6},
}

db:add(mydb.mySheet, unpack(myData))

res = db.__conn.mydb:execute("SELECT last_insert_rowid()"):fetch()

display(res)