Aditya Gupta

Aditya Gupta

Aditya Gupta is a founding member and editor at CodeForGeek. He first found his way into tech by reading articles, and now writes approachable guides to Node.js security, authentication, AI tools, coding agents, and web scraping.

Node.js MySQL Insert Record

Node.js MySQL Insert Record

I pointed a Node script at a MySQL table and the connection succeeded. The INSERT failed on a name containing an apostrophe. Pasting values into the SQL string holds until real data arrives, then a name like O’Brien ends the…

NodeJS MySQL Select Record

NodeJS MySQL Select Record

RowDataPacket is the name MySQL hands back to Node.js, and it is the line most readers get stuck on. This is the select step end to end, from a running MySQL server to a callback whose rows you can read.…

NodeJS MySQL Drop Table

NodeJS MySQL Drop Table

DROP TABLE crashed my Node process when I re-ran it without a guard, and the fix turns that crash into a warning. I built every code path below on Node 26.7.0 with mysql 2.18.1 and mysql2 3.24.4 against MariaDB 10.11.14.…

NodeJS MySQL Create Table

NodeJS MySQL Create Table

Running node app.js once creates the users table. Running it again returns Table users already exists. If you copy the Node.js MySQL create table snippet from an older tutorial you expect it to be safe to rerun because the code…

NodeJS MySQL Create Connection

NodeJS MySQL Create Connection

I rebuilt this MySQL connection from scratch on Node 26 with mysql2 3.24.4 because the old page still taught the unmaintained mysql package. It left every error to a throw that crashes your process. I ran each snippet below against…

10 Simple Steps to Solve SQL Problems [2026]

10 Simple Steps to Solve SQL Problems [2026]

SQL problems become manageable when you turn the prompt into decisions about rows, columns, grouping, and result order, and I ran the worked example below with Python 3.11.16 and SQLite 3.53.1 so you can inspect how each clause changes the…

Online SQL Formatter & Beautifier

Online SQL Formatter & Beautifier

SQL inputselect u.id,u.name,o.total from users u inner join orders o on u.id=o.user_id where o.total>100 order by o.total desc; Formatted output Format SQLCopy outputClear Paste a query, then select Format SQL. An online SQL formatter turns dense SQL into clause-separated text…