0

Table pakets

id cust ids expire
99 58267 3,4 2024-06-05
...
SELECT id 
FROM packets 
WHERE cust='58267' and 3 in (ids) and now() <= expire 
order by 1 desc
limit 1;

+------+
| id   | 
+------+
| 99   |
+------+
1 row in set (0.02 sec)

if i do:

SELECT id 
FROM packets 
WHERE cust='58267' and 4 in (ids) and now() <= expire 
order by 1 desc 

Empty set

Should be

+------+
| id   | 
+------+
| 99   |
+------+
1 row in set (0.02 sec)

What i am missing??? Thanks for all tipps or hints.

Barmar
  • 741,623
  • 53
  • 500
  • 612

0 Answers0