This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:dev:all:examples:sql [18.02.2018 16:36] – [SELECT] Manuela v.d.Decken | en:dev:all:examples:sql [20.02.2019 07:49] (current) – [SELECT] Manuela v.d.Decken | ||
---|---|---|---|
Line 16: | Line 16: | ||
Each of all the four examples give back a result-object with all records of the visible sections of a page at the current time. | Each of all the four examples give back a result-object with all records of the visible sections of a page at the current time. | ||
<code php Example-1.php> | <code php Example-1.php> | ||
- | $oResult = $oDb-> | + | $oResult = $oDb-> |
</ | </ | ||
<code php Example-2.php> | <code php Example-2.php> | ||
$sql = ' | $sql = ' | ||
- | $sql .= 'WHERE `page_id`=' | + | $sql .= 'WHERE `page_id`=' |
$sql .= 'ORDER BY `block`, `position`'; | $sql .= 'ORDER BY `block`, `position`'; | ||
$oResult = $oDb-> | $oResult = $oDb-> | ||
Line 29: | Line 29: | ||
. 'FROM `' | . 'FROM `' | ||
. 'WHERE `page_id`=' | . 'WHERE `page_id`=' | ||
- | | + | |
- | | + | |
. 'ORDER BY `block`, `position`'; | . 'ORDER BY `block`, `position`'; | ||
$oResult = $oDb-> | $oResult = $oDb-> | ||
Line 41: | Line 40: | ||
$oResult = $oDb-> | $oResult = $oDb-> | ||
</ | </ | ||
- | Question: Which of the examples are easier to read, to understand and to modify if required? **1**& | + | **Question:** Which of the examples are easier to read, understand and modify if required?\\ |
+ | **Answers: | ||
---- | ---- | ||