<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=208555911-27012006>I
haven't really played with load data. I normally work with output like that
produced by mysqldump but here's a few ideas</SPAN></FONT></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
nelug-bounces@mailman.lug.org.uk [mailto:nelug-bounces@mailman.lug.org.uk]
<B>On Behalf Of </B>Dougie Nisbet<BR><B>Sent:</B> 27 January 2006
10:16<BR><B>To:</B> North East Linux User Group mailing
list<BR><B>Subject:</B> [Nelug] MySQL and Importing<BR></FONT></DIV>
<DIV><SPAN class=208555911-27012006><FONT face=Arial color=#0000ff
size=2> </FONT></SPAN></DIV>
<DIV><SPAN class=208555911-27012006> </SPAN>The problem is that my
exported data is not neat. The fields are multi-lined, and I can't figure out
how to get MySQL to identify records and fields. <BR><SPAN
class=208555911-27012006><FONT face=Arial color=#0000ff
size=2> </FONT></SPAN></DIV></BLOCKQUOTE>
<DIV><SPAN class=208555911-27012006><FONT face=Arial color=#0000ff size=2>How
about turning all of the newlines in the recipe to \n that means that each
recipe is on one line with the data quoted.</FONT></SPAN></DIV>
<DIV><SPAN class=208555911-27012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=208555911-27012006><FONT face=Arial color=#0000ff
size=2>Another option is to try manually adding some data to mysql and dumping
it. Then see what mysql dumps and make your output copy that. I really think
that a bit of pre-processing is going to be necessary.</FONT></SPAN></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV><SPAN class=208555911-27012006> </SPAN><BR>For instance, here's the
first record as exported from HandBase. Exported as CSV, with fields enclosed
in quotation marks. As you can see, the fields are multilined.<BR><BR></DIV>
<BLOCKQUOTE>
<DIV><TT>recipe,srvs,source,sourcenotes,ingredients,method,time,cooktime,Notes,SC<BR>"Quick
chicken korma<BR>prep=15m<BR>cook=20m (plus
rice)<BR>SC=?<BR>serves=4","4","Rosemary Conley Low Fat Cookbook
Two<BR><SPAN class=208555911-27012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></TT></DIV></BLOCKQUOTE></BLOCKQUOTE>
<DIV><FONT face=Arial color=#0000ff size=2></FONT><FONT face=Arial color=#0000ff
size=2></FONT><BR><SPAN class=208555911-27012006><FONT face=Arial color=#0000ff
size=2> > </FONT></SPAN>Finally, I'm normally a CLI fan and avoid
GUIs. But if I'm going to be typing in a load of recipes I thought I'd
investigate the <SPAN class=208555911-27012006><FONT face=Arial
color=#0000ff size=2> </FONT></SPAN>GUI front-ends to mysql. Does
anyone use any or have any recommendations? I'm running Debian.<BR><SPAN
class=208555911-27012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></DIV><SPAN class=208555911-27012006><FONT face=Arial
color=#0000ff size=2><FONT face="Times New Roman" color=#000000 size=3>
<DIV><SPAN class=208555911-27012006><FONT face=Arial color=#0000ff size=2>Two
great tools that I sometimes use are</FONT></SPAN></DIV>
<DIV><SPAN class=208555911-27012006><FONT face=Arial color=#0000ff
size=2> </FONT></SPAN></DIV>
<DIV><SPAN class=208555911-27012006> </SPAN>apt-get
install</FONT> mysql-admin mysql-query-browser </FONT></SPAN></DIV>
<DIV><SPAN class=208555911-27012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=208555911-27012006><FONT face=Arial color=#0000ff
size=2>there's always phpmyadmin too.</FONT></SPAN></DIV>
<DIV><SPAN class=208555911-27012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=208555911-27012006><FONT face=Arial color=#0000ff size=2>Have
fun</FONT></SPAN></DIV>
<DIV><SPAN class=208555911-27012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=208555911-27012006><FONT face=Arial color=#0000ff
size=2>Richard</FONT></SPAN></DIV></BODY></HTML>