MySQL Forums
Forum List  »  PHP

Re: Mysql Query with field name and custom value to compare
Posted by: Peter Brawley
Date: December 11, 2020 10:06AM

I expect the mysqli API wants quotes on the left side of that comparison ... to find the source of the mismatch, check the actual values in mysQl client program...

set @extra1 = 'abc123';
set @customvalue = '123456';
set @hash = '3dc379b20a51fa4966d9ee28f2ea5c8e98ebf3b8';
set @combo = concat( @extra1, @customvalue );
set @hashcombo = sha1( @combo );
select @hashcombo, @hash, @combo=@hashcombo;;

... also in PHP.

Options: ReplyQuote


Subject
Written By
Posted
Re: Mysql Query with field name and custom value to compare
December 11, 2020 10:06AM


Sorry, only registered users may post in this forum.

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.