Re: RE: [PHP-DB] looped insert

2001-10-24 Thread Russ Michell
n, 22 Oct 2001 12:28:38 -0500 Rick Emery <[EMAIL PROTECTED]> wrote: > > > > > Construct your INSERT a piece at a time. Something like: > > > > > > $sql = "INSERT INTO $myanet02 > > > (staffdev,strategies,rules,news,information,policies) VALUES(";

Re: RE: [PHP-DB] looped insert

2001-10-24 Thread Mike Frazer
> (staffdev,strategies,rules,news,information,policies) VALUES("; > > > > for($i=0;$i > if($HTTP_POST_VARS["category{$i}"] == 'yes') { > > $sql .= "\'$email\',"; > > } > > else { > > $sql .= "N

Re: RE: [PHP-DB] looped insert

2001-10-23 Thread Russ Michell
;; > } > } > $sql = substring($sql,0,-1).")"; > //$query = mysql_query($sql,$connect) or die(mysql_error()); > echo $sql; > > -Original Message- > From: Russ Michell [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 22, 2001 11:23 AM > To: [EM

Re: RE: [PHP-DB] looped insert

2001-10-23 Thread Russ Michell
Hi all + Rick: Since the last email I have got even closer, here is the code: //If submit button selected, process those ticked checkbox categories: if(isset($submit)) { //Start off sql $sql = "INSERT INTO $myanet02 ("; //loop while categories have been ticked whi

Re: RE: [PHP-DB] looped insert

2001-10-23 Thread Russ Michell
$sql; > > -----Original Message- > From: Russ Michell [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 22, 2001 11:23 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] looped insert > > > Hi everyone: > > I've been fiddling with this all day, and well - if

RE: [PHP-DB] looped insert

2001-10-22 Thread Rick Emery
Construct your INSERT a piece at a time. Something like: $sql = "INSERT INTO $myanet02 (staffdev,strategies,rules,news,information,policies) VALUES("; for($i=0;$imailto:[EMAIL PROTECTED]] Sent: Monday, October 22, 2001 11:23 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] looped i

[PHP-DB] looped insert

2001-10-22 Thread Russ Michell
Hi everyone: I've been fiddling with this all day, and well - if it was working you wouldn't be reading this right now! ;-) My script should take the selections made by users and process them via straightforward MySQL inserts: //Get all table column names, dynamically display them as checkboxe