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.
[EMAIL PROTECTED] 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 <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
><[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
--
Gerald L. Clark
[EMAIL PROTECTED]
---------------------------------------------------------------------
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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php