I've been faffing around with MariaDB with the view to converting our SQL Server Apps. First step is to convert out CRUD code generator. I'm used to SQL Server which insists that I prefix a parameter value with @ MySQL has no such rule and you can end up with something like
where TestMAFID = -1 or TestMAFID = TestMAFID;
where the TestMAFID is both the field name and the parameter name and the query naturally does not work.
Is there a naming convention for MySQL parameter (prefixing the parameter name with @ did not work either!)
Never underestimate the power of human stupidity
Your signature (Jassim) points to a site seems to be commercial... It is not really accepted here and can cause you to be banned for spamming...
Please remove it (or restore it to its previous value - your personal site)!
Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
The instructor table looks a bit odd to me, having both ID and InstructorID I would assume you meant InstructorID and InstructorName.
And as an addition to what Mycroft said, in a fully normalized database you always use the same name for an entity throughout the database. It's not just a good idea, it's a standard[^].
And just like Mycroft said, for a surrogate key, using <tablename> + "ID" is a good idea