Undefined Index
-
I am using the following shortcode:
[sqlgetvar]SELECT CONCAT(CAST(date_format(STR_TO_DATE(englishdate,’%m/%d/%Y’),’%M %d, %Y’) AS CHAR), ” / “, islamicmonth, ” “, dayofmonth, ” “, hijriyear) AS islamicdate FROM
islamicdates
WHERE date_format(STR_TO_DATE(englishdate,’%m/%d/%Y’),’%c/%d/%Y’)=date_format(now(),’%c/%d/%Y’)[/sqlgetvar]I have also pasted the exact same query and saved it as a report, where it runs fine and returns the record as expected like this:
===============================
islamicdate
===============================
May 17, 2018 / Ramadhan 1 1439
===============================But I am still getting the following error on the page where I have used the shortcode:
Notice: Undefined index: SELECT CONCAT(CAST(date_format(STR_TO_DATE(englishdate,’%m/%d/%Y’),’%M %d, %Y’) AS CHAR), ” / “, islamicmonth, ” “, dayofmonth, ” “, hijriyear) AS islamicdate FROM
islamicdates
WHERE date_format(STR_TO_DATE(englishdate,’%m/%d/%Y’),’%c/%d/%Y’)=date_format(now(),’%c/%d/%Y’) in /home/alkhoe5/public_html/wp-content/plugins/elisqlreports/index.php on line 947
This SQL Query has not been allowed by an Administrator.
- The topic ‘Undefined Index’ is closed to new replies.