Am getting this error when I run my php code, what is the solution to it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Am getting this error when I run my php code, what is the solution to it?

Fatal error: Uncaught Error: Call to undefined function mysql_query() in ./Playground/file0.php:3 Stack trace: #0 {main} thrown in ./Playground/file0.php on line 3 <?php $show_lessons_query = "SELECT * FROM lessons WHERE lesson_category = 'Microsoft Office 2013'"; $show_lessons_result = mysql_query($show_lessons_query); $show_lessons_rowCount = mysql_num_rows($show_lessons_result); for ($i = 1; $i <= $show_lessons_rowCount; $i++) { $show_lessons_data = mysql_fetch_assoc($show_lessons_result); $lesson_id = $show_lessons_data['lesson_id'];

24th Jan 2020, 2:27 PM
Francios Marekson
Francios Marekson - avatar
2 Answers
+ 1
If you display your code in the above the community may be able to help diagnose the issue better...
24th Jan 2020, 2:39 PM
BroFar
BroFar - avatar
0
I have reposted the question
24th Jan 2020, 3:11 PM
Francios Marekson
Francios Marekson - avatar