Introduction

Tytuł

Bez zmian

Bezpośrednie łącze

Bez zmian

zawartość

OldNew
98To make a MySQL query request and fetch the results, the standard procedure is as follows: 98To make a MySQL query request and fetch the results, the standard procedure is as follows:
99 99
100```php 100```php
101$query = database::query( 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
106while ($row = database::fetch($query)) {
107 ...
108}
109``` 105```
110 106
111Note that all LiteCart tables are preceeded by a table prefix defined as DB_TABLE_PREFIX located in includes/config.inc.php. 107Note 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

View code on GitHub