Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-20-2009, 01:04 AM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
Insert

Graal Script Code:
public function AddDatadata )
{
  
temp.sql "INSERT INTO immolate_items (name, display_name, power) VALUES(`" data[0] @ "`, `" data[1] @ "`, `" data[2] @ "`)";
  
sqlexecutetemp.sqlNULL );

seems to be throwing this error:

SQL Error: no such column: testsword
Query: INSERT INTO immolate_items (name, display_name, power) VALUES(`testsword`, `Testing Sword`, `3`)

Any ideas on what I'm actually doing wrong?
Reply With Quote
  #2  
Old 12-20-2009, 01:05 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Use single quotes instead of `.
__________________
Quote:
Reply With Quote
  #3  
Old 12-20-2009, 01:20 AM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
Quote:
Originally Posted by fowlplay4 View Post
Use single quotes instead of `.
Great stuff, thanks.
Reply With Quote
  #4  
Old 12-20-2009, 02:00 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
The rule about quotes:
Use ` around identifiers (database/table/column/alias names) and ' around strings and dates. Don't quote numbers.
Reply With Quote
  #5  
Old 12-20-2009, 02:06 AM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
Quote:
Originally Posted by WhiteDragon View Post
The rule about quotes:
Use ` around identifiers (database/table/column/alias names) and ' around strings and dates. Don't quote numbers.
Duely noted, thanks. Quite sketchy when it comes to SQL.
Reply With Quote
  #6  
Old 12-20-2009, 05:01 AM
12171217 12171217 is offline
Banned
Join Date: Jan 2009
Posts: 453
12171217 has a spectacular aura about
Wow, GS2 supports SQL queries to remote servers?

That's awesome.
Reply With Quote
  #7  
Old 12-20-2009, 05:07 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Nah, only to the built-in SQLite instance.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:28 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.