Simple query error

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
christ2000
User
Posts: 519

Simple query error

Post by christ2000 »

hello i am using thhe following code to pull the total rows in a table , ui put the code in a custom file.(.php)

the code is:

<?php

$qry =mysql_query("select * from documents");
echo mysql_num_rows($qry);
?>

but i got the following error when i load the php file:

Fatal error: Uncaught Error: Call to undefined function PHPMaker2019\project1\mysql_query() in C:\xampp\htdocs\phpmaker\test.php:33 Stack trace: #0 {main} thrown in C:\xampp\htdocs\phpmaker\test.php on line 33

any idea?

thanks in advance


arbei
User
Posts: 9384

Post by arbei »

No more mysql extension, you may use the mysqli extension instead: https://php.net/manual/en/mysqli.summary.php


christ2000
User
Posts: 519

Post by christ2000 »

Thnkas


Post Reply