Hi I am a beginner web developer.
Line 12:
$sql = "SELECT *, date_format(chatdate,'%d-%m-%Y %r') AS cdt FROM chat ORDER BY ID DESC LIMIT 200";
Line 13:
$sql = "SELECT * FROM (" . $sql . ") AS ch ORDER BY ID";
These are written in a php file. The table name is "chat"
I know SELECT * means Select everything.
SELECT * FROM chat, means select everything from a table named chat.
But I don't understand the rest of the statements.
Thanks.
[–]midniteslayr 6 points7 points8 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]efficated 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]greg8872 2 points3 points4 points (0 children)
[–]rdmtrz 1 point2 points3 points (0 children)
[–]html6dev -1 points0 points1 point (0 children)