Hi Guys,
I’ve been playing around with this for a while but I really have no idea what I’m doing when it comes down to MySQL so I wonder if anyone could help me:
I want to create a snippet to retrieve the data from the latest Jot comment but only if it’s had a certain field filled in, so if my table contains...
modx_jot_fields
('51','name','name');
('51','id','6713649911');
('51','image','picture.jpg');
('52','name','name');
('52','id','6713649911');
('52','image','picture.jpg');
('52','email','[email protected]');
('52','why','This is why');
('53','name','name');
('53','id','6713649911');
('53','image','picture.jpg');
I only want to retrieve results that have the ’why’ field filled in. So in this case I just want to grab the data with the id 52 and ignore 53 (and all previous). Obviously this will change as new comments are added.
Many, many thanks in advance.