miladniroee / php-mvc-simple-framework

A simple PHP MVC framework that works without composer
MIT License
18 stars 4 forks source link

Database missing #1

Open stevegit23 opened 4 months ago

stevegit23 commented 4 months ago

Hello - script doesn't create database/table users. If I create a table users with id, name, is_active and populate it, I get an error "foreach() argument must be of type array|object"

miladniroee commented 3 months ago

Hello - script doesn't create database/table users. If I create a table users with id, name, is_active and populate it, I get an error "foreach() argument must be of type array|object"

Yes, because the script for creating tables not implemented at all.

stevegit23 commented 3 months ago

OK - but how I can fix the error I'm getting with the table I am creating? Id integer AI and primary, name text, is_active (0 or 1)

miladniroee commented 3 months ago

OK - but how I can fix the error I'm getting with the table I am creating? Id integer AI and primary, name text, is_active (0 or 1)

send me your complete error message

stevegit23 commented 3 months ago

Warning: foreach() argument must be of type array|object, null given in C:\xampp\htdocs\mvctest\Views\index\index.php on line 13

db1 db2