var result;
var b;
let result = "SELECT * FROM `". table ."` ORDER BY `id` DESC";
let b = mysql_query(result);
var_dump(b); //show false not data
AND
var result;
boolean b;
let result = "SELECT * FROM `". table ."` ORDER BY `id` DESC";
let b = (boolean) mysql_query(result);
var_dump(b); //show Segmentation fault
ALL::
namespace Mybetdata\Db;
class Db
{
const HOST = "localhost";
const ROOT = "root";
const PASS = "b64a17a27f";
const DATA = "test";
const SET = "utf8";
public link;
public table;
public function __construct()
{
var e;
try {
let this->link = mysql_connect(self::HOST, self::ROOT, self::PASS);
mysql_set_charset(self::SET);
mysql_select_db(self::DATA, this->link);
} catch \Exception, e {
echo e->getMessage();
echo "\n";
echo mysql_errno();
echo mysql_error();
}
}
public function _getall(const string table = "", where)
{
var result;
var b;
let result = "SELECT * FROM `". table ."` ORDER BY `id` DESC";
let b = mysql_query(result);
var_dump(b); //show false not data
}
}
var Db;
let Db = new \Mybetdata\Db\Db();
Db->_getall("size", null);