Re: INSERT Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Everything looks okay with this when I echo the sql string:

INSERT INTO tbl_ib_articles (issue_brief,article) VALUES ('24','30'),('24','20'),('24','31')

My question was, what do I need to change to make this an UPDATE?

Thanks,
Charles

On Monday, March 31, 2003, at 08:30 PM, JanetVal@aol.com wrote:

In a message dated 3/31/2003 5:26:36 PM Pacific Standard Time, ckline@rightcode.net writes:


> then I built the INSERT like so: > foreach($article_keys as $articleid) > { >???? $insert[] = "('$v_ib_id','$articleid')"; > } > $article_sql = "INSERT INTO tbl_ib_articles (issue_brief,article) > VALUES " . implode(',',$insert);



It's pretty much okay, except you don't have ( ) around the string that you create with the implode. You can echo $article_sql to see exactly what the SQL looks like and you can then modify your statement so you get the right SQL.

Janet


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux