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