 |
zogalogran Beginner
Joined: 23 Jun 2006 Posts: 20
|
Posted: Sat Mar 03, 2012 8:49 pm
%sql and mysql |
OK, so I've read through numerous forum threads and read the docs - but this is still kill me:
db = %sqldb(MySQLInstance, items, mysql, localhost, 3306, root, password)
The above gives me a "database name is invalid" error. The equivalent #SQLDB statement works just fine. I'm assuming based on the other posts I've read, that I need to use %sqldb for transactional statements so I can use the #call function and use the reference.
Any help? It's probably some retarded syntactical thing but it's really unclear from the docs where quotes may/may not be required, and whether the "mysql" parameter is something generic or is supposed to be more specific.
Thanks! |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Mar 03, 2012 9:56 pm |
Didn't think you could set all those fields with a local database...at any rate, if you have doubts on whether to use quotes or not then use quotes.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
zogalogran Beginner
Joined: 23 Jun 2006 Posts: 20
|
Posted: Sat Mar 03, 2012 10:21 pm |
Well,
#SQLDB MySQLInstance items mysql localhost 3306 root password
works. I can then return data via a select statement from the database. It's just the %sqldb part that seems to fail - and that's the part that i'm gathering is required for me to use insert and update statements. |
|
|
 |
|
|