public function getBirthday()
{
$today_date = getdate();
if ($today_date["mon"] < 10)
$birthmonth = "0" . $today_date["mon"];
else
$birthmonth = $today_date["mon"];
if ($today_date["mday"] < 10)
$birthday = "0" . $today_date["mday"];
else
$birthday = $today_date["mday"];
$sSql = "SELECT oxid FROM oxuser WHERE OXBIRTHDATE LIKE '%-'" . $birthmonth . "-" . $birthday . "'";
}
Ich bin mir ehrlich gesagt recht unsicher, wie ich aus dem sql statement jetzt alle Geburtstagskinder in nem Array liefern kann. Kann mir da jemand auf die Sprünge helfen?
ja das ist mir auch bewusst.
Ich bin mir nur nicht sicher, wie ich bei Oxid dann den SQL Code ausführen lasse und das Ergebnis anzeigen.
Wie funktioniert das ganze?
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘10-25’ at line 1
auch nachdem der SQL Command zu dem abgeändert wurde $sSql = "SELECT oxfname FROM oxuser WHERE oxbirthdate LIKE '%-'" . $birthmonth . "-" . $birthday;
direkt in Smarty habe ich das ganze bereits gelöst. Ich habe aber was anderes vor und mach es deshalb im Basketcontroller.
Sollte mir vielleicht mal eine neue Brille zulegen, jedoch hab ich anscheinend noch immer einen Syntaxfehler… den ich einfach nicht sehe, obwohl er direkt vor mir ist