select *,date_format(expire, "%e %b %Y") as expire2,if(lasttweet is null,1,if(datediff(utc_timestamp(),lasttweet)>0,1,0)) as tweetok,if(lastavailtweet is null,1,if(datediff(utc_timestamp(),lastavailtweet)>0,1,0)) as availtweetok from pn2_providers where pronum=

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1