Lỗi sqlstate 42s02 base table or view not found 1146 năm 2024
PDO offers you a choice of 3 different error handling strategies, to fit your style of application development.
As of PHP 8.0.0, this is the default mode. In addition to setting the error code, PDO will throw aPDOException and set its properties to reflect the error code and error information. This setting is also useful during debugging, as it will effectively "blow up" the script at the point of the error, very quickly pointing a finger at potential problem areas in your code (remember: transactions are automatically rolled back if the exception causes the script to terminate). Exception mode is also useful because you can structure your error handling more clearly than with traditional PHP-style warnings, and with less code/nesting than by running in silent mode and explicitly checking the return value of each database call. SQLSTATE[42S02]: Base table or view not found: 1146 Table 'restaurent.sessions' doesn't exist (SQL: select * from
asked Sep 27, 2022 at 9:49 4
Sometimes, it gets all values of .env files from its generated cache. On that scenario, simply run the following command to remove the cache for .env. |