Answer the question
In order to leave comments, you need to log in
Why does SELECT only return small table data?
Friends, good evening :).
Explain, prompt. How so.
I fulfill request SELECT to 1 table - all deduces.
At performance of the same request to another - it is empty.
table1 has 7 columns 2 rows
table2 has 17 columns and over 300 rows, but doesn't output even 1 (when LIMIT is 1 or WHERE `id`='1').
Connection:
$dsn = "mysql:host=$servername;dbname=$database;charset=$charset";
$options = array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_ORACLE_NULLS => PDO::NULL_EMPTY_STRING,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
);
$pdo = new PDO($dsn, $username, $password, $options);
$sql = $pdo->query("SELECT * FROM `table1`");
$sql = $pdo->query("SELECT * FROM `table2`");
array(0) { }
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question