List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:May 2 2001 1:22pm
Subject:Re: difficulty with insert into
View as plain text  
I don't know what var you aretalking about, but all the vars you
here are only one word long.

If you mean $THECONTENT, then you should have written
THECONTENT=$*

You whould have seen this if you had echo'd the variables in question
before trying to insert them.

Barry_Ringuet@stripped wrote:

> only the first word of the files being read into the var gets inserted into
> the table
> 
> #!/bin/sh
> pushcontent()
> {
> SECTIONID=4
> THETITLE=$1
> THECONTENT=$2
> THECOUNTER=1
> mysql -u root -D nuke <<EOF
> INSERT INTO seccont(artid,secid,title,content,counter)
> VALUES
> ('max(artid)','$SECTIONID','$THETITLE',"$THECONTENT",'$THECOUNTER');
> EOF
> }
> x=`ls /usr/local/apache/htdocs/rpts/rvd`
> for a in $x
> do
> y=`cat /usr/local/apache/htdocs/rpts/rvd/$a`
> pushcontent $a $y
> done
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <mysql-thread72817@stripped>
> To unsubscribe, e-mail
> <mysql-unsubscribe-gerald_clark=suppliersystems.com@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
Gerald L. Clark
gerald_clark@stripped

Thread
difficulty with insert intoBarry_Ringuet1 May
  • Re: difficulty with insert intoGerald Clark2 May