Re: [PHP] Prepared statements

2006-03-08 Thread Julius Hacker
Curt Zirzow wrote: On Mon, Mar 06, 2006 at 10:03:10PM +0100, Julius Hacker wrote: Curt Zirzow wrote: I assume your loop is something like: while(condition) { $auction_parts['id'] = 'some value'; $auction_parts['name'] = 'some value'; ...

Re: [PHP] Prepared statements

2006-03-07 Thread Julius Hacker
Anthony Ettinger wrote: On 3/6/06, Anthony Ettinger [EMAIL PROTECTED] wrote: On 3/6/06, Julius Hacker [EMAIL PROTECTED] wrote: Curt Zirzow wrote: I assume your loop is something like: while(condition) { $auction_parts['id'] = 'some value'; $auction_parts['name']

Re: [PHP] Prepared statements

2006-03-07 Thread Curt Zirzow
On Mon, Mar 06, 2006 at 10:03:10PM +0100, Julius Hacker wrote: Curt Zirzow wrote: I assume your loop is something like: while(condition) { $auction_parts['id'] = 'some value'; $auction_parts['name'] = 'some value'; ... $insert-execute(); } Yes, thats it.

Re: [PHP] Prepared statements

2006-03-06 Thread Julius Hacker
Curt Zirzow wrote: I assume your loop is something like: while(condition) { $auction_parts['id'] = 'some value'; $auction_parts['name'] = 'some value'; ... $insert-execute(); } Yes, thats it. My first guess would be, if not aleady done, initialize $auction_parts

Re: [PHP] Prepared statements

2006-03-05 Thread chris smith
MySQL returns Column 'auction_house' cannot be null. Here're some parts of my code: --- code --- $update = $this-sql-stmt_init(); $update-prepare(UPDATE auctions SET name=?, auction_house=?, link=?, prize=?, runtime=?, bids=?, picture=? WHERE link=?); $update-bind_param(sisdsiss,

Re: [PHP] Prepared statements

2006-03-05 Thread Julius Hacker
chris smith wrote: So at some point the $auction_parts['id'] is empty. As you go into the loop, print out the $auction_house[id], then work backwards... I output already some variables in the loop and all are set with correct values. As I said, if I do the bind_param inside the

Re: [PHP] Prepared statements

2006-03-05 Thread Curt Zirzow
On Sun, Mar 05, 2006 at 04:03:17AM +0100, Julius Hacker wrote: On 3/4/06, Julius Hacker [EMAIL PROTECTED] wrote: Before that foreach, I use mysqli_stmt_init, mysql_stmt_prepare and mysql_stmt_bind_param. In the foreach-loop I give the variables, which I bound with bind_param,

Re: [PHP] Prepared statements

2006-03-05 Thread Anthony Ettinger
On 3/5/06, Curt Zirzow [EMAIL PROTECTED] wrote: On Sun, Mar 05, 2006 at 04:03:17AM +0100, Julius Hacker wrote: On 3/4/06, Julius Hacker [EMAIL PROTECTED] wrote: Before that foreach, I use mysqli_stmt_init, mysql_stmt_prepare and mysql_stmt_bind_param. In the foreach-loop I give

Re: [PHP] Prepared statements

2006-03-04 Thread Julius Hacker
One other thing: If I do the bind_param within the loop, it just works. The curious is that I have to prepared statements for this loop (one for inserting data and one for updating data) and the one for updating data works and that for inserting don't. Both statements are 100% valid. Julius

Re: [PHP] Prepared statements

2006-03-04 Thread Anthony Ettinger
On 3/4/06, Julius Hacker [EMAIL PROTECTED] wrote: One other thing: If I do the bind_param within the loop, it just works. The curious is that I have to prepared statements for this loop (one for inserting data and one for updating data) and the one for updating data works and that for

Re: [PHP] Prepared statements

2006-03-04 Thread Julius Hacker
Anthony Ettinger wrote: On 3/4/06, Julius Hacker [EMAIL PROTECTED] wrote: One other thing: If I do the bind_param within the loop, it just works. The curious is that I have to prepared statements for this loop (one for inserting data and one for updating data) and the one for updating

Re: [PHP] Prepared statements

2006-03-03 Thread Anthony Ettinger
are you executing the statement in your loop too? On 3/3/06, Julius Hacker [EMAIL PROTECTED] wrote: Hi, so I need help again: I want to use prepared statements to insert lots of data in my MySQL-database. For that I use foreach because I have an array containing all necessary information.