MySQL Forums
Forum List  »  PHP

Re: PHP UPDATE passes a blank string instead of contents of variable
Posted by: Peter Brawley
Date: July 27, 2015 04:44PM

> Pete asked me to do a debug

Please, "Peter" not "Pete".

Perhaps this would have been a better way to stub out that array:

foreach( $_FILES['imgs']['tmp_name'] as $key => $tmp_name )
echo "key:$key tmp_name:$tmp_name<br />";

IAC did you expect $_FILES['imgs']['tmp_name'] to have one populated row and a dozen blanks?

> SQLFILE Contents before the query are:
> UPDATE `animals` SET `img1` = 'summer2.jpg' WHERE `id` = 44

Does that query have the expected result?

All the other array entries are empty, what result did you expect?

BTW, surrounding scalar values with {} in double quotes strings is unnecessary.



Edited 1 time(s). Last edit at 07/27/2015 05:03PM by Peter Brawley.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.