I have a simple SQL query that is not working. I have tried everything I know to fix this query, but to no avail.
$Data = $connection->prepare("SELECT * FROM EXAMPLE"); The table on the database exists, and the connection to the database is set properly.
I have also tried this:
$Data = $connection->prepare("SELECT ID FROM EXAMPLE WHERE EXAMPLE1=:EXAMPLE1 "); $Data->execute(array( ':EXAMPLE1' => $EXAMPLE1, ));
$Datalater?rowcountfor selects. php.net/manual/en/pdostatement.rowcount.phpIf the last SQL statement executed by the associated PDOStatement was a SELECT statement, some databases may return the number of rows returned by that statement. However, this behaviour is not guaranteed for all databases and should not be relied on for portable applications.