Introduction
Tytuł
Bez zmianBezpośrednie łącze
Bez zmianzawartość
| Old | New | ||
|---|---|---|---|
| 98 | To make a MySQL query request and fetch the results, the standard procedure is as follows: | 98 | To make a MySQL query request and fetch the results, the standard procedure is as follows: |
| 99 | 99 | ||
| 100 | ```php | 100 | ```php |
| 101 | $ | 101 | $rows = database::query( |
| 102 | "SELECT * FROM ". DB_TABLE_PREFIX ."mytable | 102 | "SELECT * FROM ". DB_TABLE_PREFIX ."mytable |
| 103 | ORDER BY `id`;" | 103 | ORDER BY `id`;" |
| 104 | ); | 104 | )->fetch_all(); |
| 105 | |||
| 106 | while ($row = database::fetch($query)) { | ||
| 107 | ... | ||
| 108 | } | ||
| 109 | ``` | 105 | ``` |
| 110 | 106 | ||
| 111 | Note that all LiteCart tables are preceeded by a table prefix defined as DB_TABLE_PREFIX located in includes/config.inc.php. | 107 | Note that all LiteCart tables are preceeded by a table prefix defined as DB_TABLE_PREFIX located in includes/config.inc.php. |
Edytowane przez oniricorpe w 13 kwi 2026 o 03:49