syntaxseed, to wordpress avatar

I have an #SQL #WordPress query that is ordering by post_date. But the date for this particular set of posts is identical.

So it's giving me them in different orders if I run the same query a few times. Which is messing up pagination.

What the heck?


davidbisset, to random avatar
mackuba, (edited ) to random avatar

Ok, #SQL wizards plz help 🥺

I have a table posts (#SQLite), with a string repo (user DID) and int thread_id. Thread_id references the thread root post, around 1/6 of posts have thread_id NULL, the rest are replies. There's an index on repo+time and one on thread_id.

I want to select recent posts from one or more users that have thread_id NULL. But this very smart query planner uses the thread_id index to find posts, even though that will make it check 1/6 of all posts…

marekkuethe, to PostgreSQL German

Der Dozent meinte, ich könnte keine Arrays in einer Datenbank speichern.
Irgendwie kann ich aber genau das in PostgreSQL machen 🤷‍♂️.

pwaring, to random avatar

Just spent longer than I should wondering why a query wasn't producing the result I wanted, before remembering that you can't do something like this:

WHERE column = ?

if the placeholder value is NULL, you have to change the clause to:


Empower Your Business with Expert SQL Services Provider Company (

Transform your business with the expertise of our SQL services provider company. Harness the power of structured query language to optimize your database management, streamline operations, and unlock valuable insights. Trust our team of experts to deliver tailored solutions that elevate your data infrastructure and empower your...

adminmagazine, to opensource avatar

Free Focus Guide: To harness the power of data, you need a database management system that offers flexibility and freedom. Download this new focus guide and get up to speed on the open source database ecosystem.
#OpenSource #database #Percona #MongoDB #MySQL #MariaDB #PostgreSQL #Firebird #CUBRID #NoSQL #JanusGraph #Redis #CouchDB #DBMS #SQL #ApacheCassandra

kubikpixel, to PostgreSQL avatar

SQL Injection Cheatsheet:

This is an SQL injection cheatsheet with tried and true payloads / techniques that cover the 5 most popular database variants and their derivatives.


BenjaminHCCarr, to random avatar

#NorthYorkshire Council to phase out #apostrophe use on #streetsigns To Avoid #Database Problems
The North Yorkshire Council in England announced it will ban apostrophes on street signs as it can affect geographical databases. Resident Anne Keywood told the BBC that she urged the authority to retain apostrophes, saying: "If you start losing things like that then everything goes downhill doesn't it?"

Sanitze your #SQL people!

Natanox, to webdev avatar

I probably get flooded by asking this but welp, here I go:

I'm looking for a good, visual (!) #tutorial for #WebDevelopment that focuses on Codium, Firefox and other Open-Source tools. My specific interests are to learn #HTML, #CSS, #PHP and #SQL. Perhaps some minor #Javascript, however I'd like to primarily work without it.

I'm a visual learner, extended theory in text won't help me at all. As language is visual to me, so is #programming.

Anyone knows something that checks these boxes?

SergKoren, to Life avatar

What would the sequel to your life be? Or would there be no-sequel.

cwoodruff, to random avatar

If you ever wanted the Chinook database for @firebirdsql and have been waiting, your day has come! You can find the restore file and SQL script for DDL and data at

#database #SQL #firebird

silverpill, to random avatar

can-i-use but for :

Very cool

davidbisset, to opensource avatar

Dataherald is a natural language to #SQL engine that is #opensource. #LLM #Database

hunleyd, to postgres avatar
linuxuserspace, to history avatar

The further you dig, the farther the #history goes, so we settled on starting in 1906, then the 90's, then #Slackware. This is the history of #Xz that culminated into a " #hack " that would have rocked the world if not for one intrepid #SQL #developer.

#Linux #Peertube #OpenSource #FOSS

stevensanderson, to medical avatar

DNFB for medicine is discharged not final billed and is used a lot at hospitals as it represents the AR not yet billable. It is important to keep this to a minimum of days for efficiency and ability to get paid. It affects cashflow, so the lower the better. I wrote a quick diddy that sifted 147mllion rows in 2 seconds to give me my average dnfb by AR snapshot month

nihilistdatascientist, to datascience avatar

Once I learned that SQL is usually case-insensitive I decided to write all my SQL in SpongeMock, because nothing fucking matters:

fROm mY_tAblE
wHeRe cOl1 iS nOt nUlL
aNd CoL2 = 23

argv_minus_one, to rust avatar

I wonder if anyone has ever written an embedded in which there is no run-time interpreter, and all SQL queries are translated into machine code at compile time.

Kinda like sqlx, except queries are fully compiled at compile time, not just checked for correct syntax and types.

I'm guessing this would be extremely specific to one language, and outright impossible in most programming languages.

joelanman, to random avatar

Another db question! I'm using migration files whenever I make a change to the db. When I'm doing dev, whats a good source of truth for the current structure of the tables (column names, types and so on)? I could app switch to my db admin app but I'd prefer a quick way to reference inside VS Code

joelanman, to random avatar

I have a database question - say you have an items table and a messages table, and messages can refer to items. If someone needs to delete an item, you can't because of the foreign reference in messages.

I know you could 'soft delete' - set a status column to deleted, but what if you really need to delete, for example because the content is illegal or the user has a legal right to delete it?

nurkiewicz, to random avatar

Little Bobby Tables? More like Little Bobby's Street: "Council claims database pain forced it to drop apostrophes from street names". Sadly, it was not injection |

skribe, to django avatar

Django peeps. I want to link my languages table (English, French, Chinese, etc) to the word classes (Nouns, Verbs, Adjectives, etc) table. It would be a many-to-many relationship, but I'm not sure whether to use a join table or the many-to-many model. What's the most Django way?

OldGrumpyBitWrangler, to php

An instance of a popular CMS is used for a website. While analyzing I'm coming across a a table in it's MySQL database where a column called "deleted" is defined as such:

deleted` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'A boolean indicating whether this data item has been deleted‘


There should be a license allowing allowed to write software used by someone else. Like with drivers licenses it needs a points system for violations and license revocation.

aeveltstra, to random avatar

Silly mistakes being silly:

Attempting to sort day name results from an query by day name.

As if the SQL engine would know day names and apply a natural sort, instead of a text based one.

I'm spoiled by Apple computers.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • thenastyranch
  • magazineikmin
  • mdbf
  • GTA5RPClips
  • everett
  • rosin
  • Youngstown
  • tacticalgear
  • slotface
  • ngwrru68w68
  • kavyap
  • DreamBathrooms
  • khanakhh
  • megavids
  • tester
  • ethstaker
  • cubers
  • osvaldo12
  • cisconetworking
  • Durango
  • InstantRegret
  • normalnudes
  • Leos
  • modclub
  • anitta
  • provamag3
  • lostlight
  • All magazines