[REBOL] Re: REBOL and database stuff
From: mat:plothatching at: 30-Mar-2003 17:48
Hello Mat,
MB> Has anyone done anything like that? Or perhaps you've just done a fair
MB> bit of database manipulation with REBOL/Command and MySQL and you
MB> wouldn't mind tossing me the script to take a 'butchers' at as we say
MB> in my parts.
Maybe it might help if I had a specific query :)
> The next example inserts multiple REBOL values into an SQL statement:
>
> fname: "Johnny"
> lname: "Johnson"
> title: "President"
> phone: "(707) 555-1212"insert db-port [{
> INSERT INTO table1 (First, LastName, Title, Phone)
> values (?, ?, ?, ?)
> } fname lname title phone
> ]
This demonstrates how you insert REBOL variables into an SQL
statement. I have no trouble with that although it is a bit weird and
not very REBOL like.
Unfortunately one doesn't appear to be able to substitute 'table1' for
an ? there, so you can't formate a specific table request.
I thought, "No problem, I'll just construct the SQL query myself" and
I did that, inserted it to the port and it barfed. So maybe I was
missing something there.
Has anyone else done a workaround for that?
Maybe I should have just slapped all my data into one big table rather
than having many. A little counter-intuitive to me though.
Regards,
Mat Bettinson - +44-(0)20-83401514.