Good afternoon, I need to make a query to an Oracle database, and it shows me this error
Fatal error: Uncaught PDOException: SQLSTATE [HY000]: General error: 933 OCIStmtExecute: ORA-00933: SQL command not properly ended (ext \ pdo_oci \ oci_statement.c: 159) in C: \ xampp \ htdocs \ oracle \ conexion.php: 40 Stack trace: # 0 C: \ xampp \ htdocs \ oracle \ connectionion.php (40): PDOStatement-> execute () # 1 {main} thrown in C: \ xampp \ htdocs \ oracle \ conexion.php on line 40
<?php
$pagination = new PDO_Pagination($connection);
$contador=1;
$search= null;
$start= null;
$pagination->rowCount('SELECT NOMBRE FROM MATERIAPRIMA ');
$pagination->config(8, 10);
$sql = "SELECT NOMBRE FROM MATERIAPRIMA LIMIT $pagination->start_row, $pagination->max_rows";
$query = $connection->prepare($sql);
$query->execute();
$model = array();
while($rows = $query->fetch(PDO::FETCH_ASSOC))
{
$model[] = $rows;
}
?>
<tr class="active">
<thead>
<th>#</th>
<th>CÓDIGO</th>
<th>INSUMO</th>
<th>USO</th>
</tr>
</thead>
<?php
foreach($model as $row)
{
$contador ='#';
echo "<tbody id='timeReals'>";
echo "<tr>";
echo "<td>".$contador."</td>";
echo "<td>".$row['CODIGO']."</td>";
echo "<td>".$row['NOMBRE']."</td>";
echo "<td>".$row['IDUSO']."</td>";
$contador++;
}
?>
<?php
echo "<center>";
$pagination->pages("bt");
echo "</center>";
?>