I'm developing an API with Nodejs and I have a create project endpoint and a create patient endpoint. Both of them work if I create the database tables with mySql.
But I need to run first create project which creates some tables to be used by create user endpoint. The problem comes when I call user endpoint and throws this:
** Connection to project psapp_demo successfully.
*** Error: ER_NO_SUCH_TABLE: Table 'psapp_demo_proposa58_pr.displayer_patient' doesn't exist
But database psapp_demo_proposa58_pr
and table displayer_patient
exist and are accessible throw PHPmyadmin.
Code for creating a new patient is based on a promise which is catching the error:
Services.user.create(connection,req,userId,req.body,clinicId)
.then((userId) => { req.userId = userId; next() })
.fail((err) => next(err))
Anyway, database created with a project endpoint also does not work with phpmyadmin so problem seems to realy on the database, not the code. This is the error where you can see I can even navigate with phpmyadmin throw that databases but are not located when I try to insert something:
A SELECT
operation throws empty which is right. With a SELECT
, there is not error.
Do you know why could it be happening? Thanks