CSE411 ยท Quiz 4

Is new mysqli()
really a mistake?

A disagreement about one line of PHP, kept exactly as it happened. Then what it says about the course it came from.

Sir (CSE411) last seen today at 7:27 am
Tuesday, 25 August 2026
Me

Assalamu alaikum sir

I hope you're doing well.
I'm writing to formally request a re-evaluation of my Quiz 4 paper, on which I received 16/20. I have reviewed each of my answers carefully and believe all responses were correct as written.

Instructor
Photo of the graded Quiz 4 answer script. The handwritten line $conn = new mysqli($DB_HOST, $DB_USER, $DB_PASS, $DB_NAME); is circled in red pen and annotated mysqli_connect.
Instructor

This error for both program

Wednesday, 26 August 2026
Me
Source code of database.php: it sets $DB_HOST, $DB_USER, $DB_PASS and $DB_NAME, connects with $conn = new mysqli(...), then checks $conn->connect_error and calls die() on failure.
Me

This is the code I ran, and it worked perfectly fine.

Me W3Schools.com W3Schools offers free online tutorials, references and exercises in all the major languages of the web. www.w3schools.com

Here is also a reference from w3schools, I used the MySQLi Object-Oriented to connect to databse.
https://www.w3schools.com/php/php_mysql_connect.asp

Instructor

It will be: mysqli_connect

Me

Sir (new mysqli) also works, I sent a code reference from w3schools with my working code screenshot from VS Code.

Me

It's just another way of making connection.

Me

new mysqli() and mysqli_connect() are not two different methods. The PHP manual lists mysqli_connect as an alias of mysqli::__construct; same function, same connection object. That's the official documentation.
https://www.php.net/manual/en/mysqli.construct.php

My code ran correctly, video attached.

Me

Following up on my Quiz 4 re-evaluation request. Please let me know your decision whenever convenient.

Where it stands

He updated my marks to 18/20. Two came back. He still hasn't given me the other two, even though I'm right, and I've had no explanation for it.

The PHP manual settles the language question. It documents mysqli_connect() as an alias of mysqli::__construct(). An alias isn't a similar function. It's the same function under a second name, so new mysqli(...) and mysqli_connect(...) open the same connection and give back the same object. That sentence is on the manual page itself. W3Schools, which this course points students to, teaches both styles side by side.

So there's one question I can't get past. How does a faculty member teaching Database Management Systems at North South University not know these two are the same thing? This isn't an obscure corner of PHP. It's the first thing the MySQLi documentation tells you.

I want to be clear about something. I wouldn't mind losing marks for a real mistake in the code. If something were broken I'd take the deduction and move on, because that's what a quiz is for. Nothing here was broken. The code was right, the manual backs it up, and I recorded it running. Two marks are still gone and nobody has explained them.

What this course actually teaches in 2026

The course outline lists the topics as physical data organisation, schema design, normalisation, CODASYL implementation, network databases, distributed databases, database machines, and Datalog.

Most of that stopped being current decades ago. CODASYL was standardised by the DBTG in 1971. The network model lost to the relational model in the early eighties. Database machines were a research direction that died commercially around the same time. Datalog stayed in academia and never really left.

TopicSlidesUsed in industry today
CODASYL, navigated with COBOL FIND / GET / STORE29No
Network model21No
Database machinesoutlineNo
DatalogoutlineRare, academic
Advanced SQL: cursors, triggers, stored procedures19Partly. Cursors are the thing you are told to avoid
PHP and MySQL13Yes
NoSQL18Yes
Distributed databases44Yes
Machine learning and intelligent databases59Yes, but it belongs in an ML course

There is one more detail worth knowing, given what I lost marks for. The PHP lecture's own connection code has no error check at all. It connects and prints "Connected successfully!" whether the connection worked or not. My code checked connect_error before doing anything. That is the code that got marked down.

What the final exam asks you to do

The final is on 2 September 2026. It has coding questions from four topics:

  1. NoSQL and Python
  2. PHP and MySQL
  3. Machine learning and intelligent databases
  4. Distributed databases

Quiz 4's syllabus is inside the final, so the exact argument on this page is about to happen again, on a bigger paper.

All of it has to be written by hand, on paper.

I genuinely don't understand what that measures. Every editor autocompletes. You type three letters and it finishes the function name, shows you the parameter order, and underlines the typo before you've finished the line. Nobody has written PHP from memory since about 2010, and nobody is asked to at work.

Memorising syntax is a CSE115 exercise. This is a 400 level course. Whether I remember if it's mysqli_fetch_assoc or mysqli_fetch_array says nothing about whether I can design a schema, choose an index, or reason about what happens to a distributed transaction when a node drops.

And that leads somewhere I'd rather not have to go. The person setting these papers marked a correct connection as an error, and only moved the grade after being shown the official documentation for it. So if the faculty doesn't reliably understand the code himself, why set coding assessments at all? And why on paper, where there is no editor, no manual, and no way to run the thing and find out?

About the marking

The questions themselves are easy. That has never been the problem.

The problem is what happens to the marks afterwards. Quiz 4 lost marks for writing new mysqli() instead of mysqli_connect(), and those are the same function. Quiz 1 lost 2 marks and I still don't know what for.

I'd rather be marked hard on something real than keep losing marks to a preference that was never written down anywhere.

To be fair, anyone can get this wrong. There is usually more than one way to write the same thing, and nobody has seen all of them. Someone grading a stack of papers who hasn't run into the object-oriented style before could reasonably stop and question it. I don't hold that against anyone.

What matters is what happens next. In this field being wrong is normal. Checking, admitting it and correcting yourself is the actual skill, and every good engineer I know does it constantly. It doesn't cost you authority. It's where authority comes from. I sent the manual, a reference and a video of the code running. What came back was two marks and no explanation.

I signed up expecting to learn advanced database concepts. That is the name of the course. What I'm walking away with instead is regret, frustration and disappointment.