Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <? $modx->addPackage('MapProduct', $modx->getOption('core_path').'components/MapProduct/model/','modx_');
- or add var(системные переменные) [{"collections":{"path":"[[++core_path]]components/collections/model/"}},{"MapProduct":{"path":"[[++core_path]]components/MapProduct/model/"}}]
- $item = $modx->newObject('MapProduct');
- print_r($item->toArray());
- <?php
- $modx->addPackage('MapProduct', $modx->getOption('core_path').'components/MapProduct/model/','modx_');
- $pdo = $modx->getService('pdoTools');
- $q = $modx->newQuery('MapProduct');
- $q->select( array("id","art") );
- $q->limit(2000);
- $s = $q->prepare();
- $s->execute();
- while($row = $s->fetch(PDO::FETCH_ASSOC)) {
- print $row['art'].PHP_EOL;
- }
- print '<pre>'; print_r($pdo->getTime()); print '</pre>';
- $pdo = $modx->getService('pdoTools');
- $q = $modx->prepare("SELECT * FROM modx_map_product LIMIT 2000");
- $q->execute();
- while($row = $q->fetch(PDO::FETCH_ASSOC)) {
- print $row['art'].PHP_EOL;
- }
- print '<pre>'; print_r($pdo->getTime()); print '</pre>';
- ----------------------
- <?php
- $modx->addPackage('MapProduct', $modx->getOption('core_path').'components/MapProduct/model/','modx_');
- $q = $modx->newQuery('MapProduct');
- $q->select(array("id","art"));
- $q->limit(2000);
- $query = $q->prepare();
- $query->execute();
- while($row = $query->fetch(PDO::FETCH_ASSOC)) {
- print $row['art'] . "\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement