Forum Moderators: coopster
EXPLAIN select * from table where id=$id
EXPLAIN select field1, field2 ... from table where id=$id
also, i am trying to finish one system i am writing in PHP-MySQL combination. but i have used tons of coding in it (i mean, manually coding the html plus the sql statements inside the php scripts)... i am wondering about the better way to do it... can somebody point me to the right direction to take? thanks in advance...
[dev.mysql.com...]
When you precede a SELECT statement with the keyword EXPLAIN, MySQL displays information from the optimizer about the query execution plan. That is, MySQL explains how it would process the SELECT, including information about how tables are joined and in which order. EXPLAIN EXTENDED can be used to provide additional information.
and for more
[dev.mysql.com...]
as for whether coding html and queries into actual scripts is good or bad, there is no one answer to that. It is fairly situational.
and to make it more easier for yourself use template engine ti separate the html code from the php code
and i strongly recommend smarty!it's free and it will save u lots of time!
good luck!