converting v6,5,4 to v7

1.36K
.
Here share how to convert below sql command from previous versions to v7

mysql_fetch_array()
mysql_fetch_assoc()
mysql_num_rows()
mysql_query()
mysql_real_escape_string()
mysql_result()
.
Just download the two versions... 6 and 7 and see difference
.
╭∩╮ (`-`) ╭∩╮
I recommend that you wait for mobiCMS.
I hope in September or October there will be a release.
.
Добавлено: 15.07.2017 / 00:51
# AlkatraZ (14.07.2017 / 22:31)
I recommend that you wait for mobiCMS.
I hope in September or October there will be a release.
OK sir thank you very much for that information, am using ( JohnCMS NEXT Mobile Content Management System (http://johncms.com))
*

Добавлено: 15.07.2017 / 00:52
My website link is http://kinsvilla.com.ng

Добавлено: 16.07.2017 / 04:01
<?php
/*JohnCMS NEXT 
*/
 define('_IN_JOHNCMS', 1);

require('../system/bootstrap.php');

/** @var Psr\Container\ContainerInterface $container */
$container = App::getContainer();

/** @var PDO $db */
$db = $container->get(PDO::class);

/** @var Johncms\Api\UserInterface $systemUser */
$systemUser = $container->get(Johncms\Api\UserInterface::class);

/** @var Johncms\Api\ToolsInterface $tools */
$tools = $container->get(Johncms\Api\ToolsInterface::class);

/** @var Johncms\Api\ToolsInterface $bbcode */
$bbcode = $container->get(Johncms\Api\BbcodeInterface::class);

/** @var Johncms\Api\ConfigInterface $config */
$config = $container->get(Johncms\Api\ConfigInterface::class);

/** @var Johncms\Counters $counters */
$counters = App::getContainer()->get('counters');

/** @var Zend\I18n\Translator\Translator $translator */
$translator = $container->get(Zend\I18n\Translator\Translator::class);
$translator->addTranslationFilePattern('gettext', __DIR__ . '/locale', '/%s/default.mo');


$textl = _t('Shopping');
$headmod = 'shop installation';
require('../system/head.php');

echo '<div class="phdr">Установка Магазина Сайта</div>';

if ($systemUser-> isValid() && $systemUser-> rights >= 9) { 
switch ($act) {
case 'install': 
$db->query("DROP TABLE `shop`");
("CREATE TABLE IF NOT EXISTS `shop` (
  `id` int(3) NOT NULL auto_increment,
  `price` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE = MyISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT = 1;");

$db->query("ALTER TABLE `users` ADD `cnick` varchar(25) NOT NULL DEFAULT '0'");
$db->query("ALTER TABLE `users` ADD `cstat` varchar(25) NOT NULL DEFAULT '0'");

$db->query("INSERT INTO `shop` SET `price` = '10'");
$db->query("INSERT INTO `shop` SET `price` = '20'");
$db->query("INSERT INTO `shop` SET `price` = '30'");
$db->query("INSERT INTO `shop` SET `price` = '40'");

$db->query("INSERT INTO `shop` SET `price` = '20'");
$db->query("INSERT INTO `shop` SET `price` = '15'");
$db->query("INSERT INTO `shop` SET `price` = '15'");
$db->query("INSERT INTO `shop` SET `price` = '10'");
$db->query("INSERT INTO `shop` SET `price` = '5'");

$db->query("INSERT INTO `shop` SET `price` = '20'");
$db->query("INSERT INTO `shop` SET `price` = '10'");
$db->query("INSERT INTO `shop` SET `price` = '10'");

$db->query("INSERT INTO `shop` SET `price` = '30'");

echo '<div class="gmenu"> Tables are successfully created! </div>';
             break;
default:
echo '<div class="list1">';
include_once ('reedme.txt');
echo '</div>';
echo '<div class="list2"><a href="/shop/install.php?act=install">Install Module</a>Shop site <b>v1.3.0</b>johncms Shop</div>';
}
  } else {
  echo '<div class="rmenu"> Insufficient rights! The module can only be
installed by SW!
</div>';
  }
require_once ('../system/end.php');


?>

I need help here please urgent.

Добавлено: 16.07.2017 / 04:02
To help me fix this cod
.
Добавлено: 16.07.2017 / 11:27
What is the error?

Добавлено: 16.07.2017 / 11:29
Use $db->exec. Not $db->query
.
# AlkatraZ (14.07.2017 / 22:31)
I recommend that you wait for mobiCMS.
I hope in September or October there will be a release.
I will be waiting for it. I have stop all mods and support to v7, 6, 5, 4. Am waiting for the mobicms, as soon as it's out I will start modifications to mobicms, because of way it's looks very easy to understand and workable in terms of the infrastructure
.
CyberGhostNet Group
Waiting alkatraz for mobicms
Всего: 7