嗨,我所有我保持這個錯誤它加載一個很簡單的頁面我不能工作它是什麼,我知道它說,但我難住任何幫助將不勝感激正確的語法的MySQL服務器版本使用附近'和epg_data.start''ORDER BY epg_data.start DESC'在第6行
你有你的SQL語法錯誤;檢查對應於你的MySQL服務器版本正確的語法使用近「AND epg_data.start」「ORDER BY epg_data.start DESC」在行手動6
$query_Recordset1 = "SELECT streams.id, epg_data.lang, epg_data.start, epg_data.end, epg_data.description, streams_sys.stream_status, streams.stream_display_name, streams.stream_icon, epg_data.title AS epg_title
FROM ((streams_sys
LEFT JOIN streams ON streams.id=streams_sys.stream_id)
RIGHT JOIN epg_data ON epg_data.channel_id=streams.channel_id)
WHERE streams.id=".$_GET["id"]."
AND epg_data.start<NOW()
AND epg_data.end>'".$_GET["time"]."'
ORDER BY epg_data.start DESC";
調試提示:在將這些變量放入(例如'echo $ query_Recordset1')之後,打印出實際查詢*,您很快就會發現問題所在。 (我的猜測是'$ _GET [「id」]'不會返回任何內容,但它只是一個猜測而不會看到您的實際SQL。)另外:您的查詢容易受到SQL注入的攻擊。使用實際參數準備的查詢。 –
https://en.wikipedia.org/wiki/SQL_injection#Technical_implementations – PeterM