30,997
edits
mNo edit summary Tag: 2017 source edit |
mNo edit summary Tag: 2017 source edit |
||
| Line 51: | Line 51: | ||
$var2 = 1; | $var2 = 1; | ||
$var3 = 1; | $var3 = 1; | ||
</ | </sousyntaxhighlightrce> | ||
instead of | instead of | ||
< | <syntaxhighlight lang="PHP"> | ||
$var1 = $var2 = $var3 = 1; | $var1 = $var2 = $var3 = 1; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 270: | Line 270: | ||
When doing select, we can use alias to simplify writing/reading of requests: | When doing select, we can use alias to simplify writing/reading of requests: | ||
< | <syntaxhighlight lang="sql"> | ||
select chp1, chpxxx2 as chp2 from table2 as t1, table2 as t2 where t1.chpx = t2.chpy | select chp1, chpxxx2 as chp2 from table2 as t1, table2 as t2 where t1.chpx = t2.chpy | ||
</ | </syntaxhighlight> | ||
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. | ||
| Line 343: | Line 343: | ||
MySQL Syntax: | MySQL Syntax: | ||
< | <syntaxhighlight lang="sql"> | ||
UPDATE table_taget as target, table_source as source SET fieldtarget=source.fieldsource | UPDATE table_taget as target, table_source as source SET fieldtarget=source.fieldsource | ||
WHERE source.rowid=target.rowid; | WHERE source.rowid=target.rowid; | ||
</ | </syntaxhighlight> | ||
PgSQL Syntax: | PgSQL Syntax: | ||