31,003
edits
Tag: 2017 source edit |
Tag: 2017 source edit |
||
| Line 254: | Line 254: | ||
However, we must not used alias for update request as they are not compatible with Mysql 3.1. | However, we must not used alias for update request as they are not compatible with Mysql 3.1. | ||
* Using SELECT * is forbidden ! When using SELECT you must define complete list of fields to get. This avoids confusion. Example: | * Using SELECT * is forbidden ! When using SELECT you must define complete list of fields to get. This avoids confusion. And above all, this make reengeering of code easier and make impact analysis of change on a field possible. Example: | ||
<source lang="sql"> | <source lang="sql"> | ||
SELECT field_a, field_b, field_c FROM table_1 WHERE field_d = '$id' | SELECT field_a, field_b, field_c FROM table_1 WHERE field_d = '$id' | ||