« first day (1639 days earlier)      last day (1019 days later) » 

9:22 AM
Hm.. I'm updating a table called "supplier" and the column "bafin" is unique.
$SQL = "update supplier
set bafin = '".$query->escape_string($bafin)."'
";

But somehow I cant update ist, as it gives this error: ERROR: duplicate key value violates unique constraint "supplier_unique_bafin"
SQL Status:23505
Detail:Key (bafin)=(5342) already exists.

Any Ideas?
 
 
5 hours later…
2:42 PM
Can anyone help me with this question I posted: stackoverflow.com/q/32334383/1252947
 
3:19 PM
hi
 
 
2 hours later…
5:12 PM
@sguetsch Whats the result of SELECT COUNT(*) FROM supplier WHERE bafin = 5342?
 
@sguetsch apparently that value already exists in that column
@sguetsch also, wouldn't you want a WHERE clause on that query?
@PedroPinheiro What's your definition of "first" or "last"? Least id and greatest id?
@PedroPinheiro The general solution to the problem you have is the "groupwise max" problem - googling that should turn up some options
 

« first day (1639 days earlier)      last day (1019 days later) »