Re: Error Code: 1452 Cannot add or update a child row
Eran Yasso Wrote:
-------------------------------------------------------
> Hi,
>
> This is the insert statement for the users row:
> #INSERT INTO users(userName, password, salt, name,
> email, contactPerson, mobile, phoneNumber,
> isActive, vatNumber, city, street, streetNumber,
> userType, solRevenue )
> #VALUES ("userName", "password", "salt", "name",
> "email", "contactPerson", NULL), "@mobile",
> "@phoneNumber", 1, "@vatNumber", "@city",
> "@street", 1, 0, 98);
>
> Please note that adding row to order used to work
> for more than half a year and for some reason it
> stopped working.
> The problem is that it happens in production db
> while in debug db it works great.
> I compared the two db schemes and they seems to be
> exactly the same.
>
> Thanks.
Seems to be a mistake in the insert. I'll repost. Isn't There edit post option?
INSERT INTO users(userName, password, salt, name, email, contactPerson, mobile, phoneNumber, isActive, vatNumber, city, street, streetNumber, userType, solRevenue )
VALUES ("userName", "password", "salt", "name", "email", "contactPerson", "@mobile", "@phoneNumber", 1, "@vatNumber", "@city", "@street", 1, 0, 98);