Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: REBOL and database stuff

From: greggirwin:mindspring at: 30-Mar-2003 10:41

Hi 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. Have you looked at DocKimbel's MySQL interface. People seem to like that a lot, though I've done nothing more than read the docs on it myself.
>> 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 >> ]
Here's an example for Doc's MySQL: author: "Elan" title: "Rebol Official Guide" insert db ["insert into mybooks values (?,?)" author title] MB> Unfortunately one doesn't appear to be able to substitute 'table1' for MB> an ? there, so you can't formate a specific table request. What about using COMPOSE, or REPLACE with a template query string, to create your SQL statement? Not sure why it might have choked on the one you created. MB> Maybe I should have just slapped all my data into one big table rather MB> than having many. A little counter-intuitive to me though. You mentioend having 5,000 fields in your first message. What the heck do you have in there!? ;) Can you provide an idea of what fields are important, how many records it needs to handle, and how you need it to work (e.g. do you get lots of updates from somewhere, mostly filtering to send groups of emails, etc.) What would you want in a native REBOL database? -- Gregg