Thread Type: Discussion

General developer discussion.

0

I’m Building Ashline Relay: An Original Black-Led Platformer Prototype

I’m working on a browser-based platformer called DamnBlackLink: Ashline Relay. That is the working title, not a final cleared brand. This is an early playable prototype, and I’m sharing it to get feedback before expanding the game. Why I’m Building ItI’ve been coding since I was young, starting with Logo on an Apple IIe. Game…

Join Discussion
0

Parameterized queries in PHP, Python & Ruby: what is your default pattern for dynamic SQL?

I work across PHP, Python, Ruby and plain SQL, and one thing I keep noticing in code reviews is that every stack has its own "safe" way to build queries, and people still end up concatenating strings when a query gets dynamic (search filters, ORDER BY, IN lists, etc.). [PSYOUTUBE|2eC8-9EnBPE] So I'm curious what everyone…

php
<?php
$stmt = $pdo->prepare('SELECT id, name FROM users WHERE email = :email');
$stmt->execute([':email' => $email]);
$user = $stmt->fetch(PDO::FETCH_ASSOC);
python
cur.execute("SELECT id, name FROM users WHERE email = ?", (email,))
user = cur.fetchone()
Join Discussion