Good American Family star reveals the harrowing scene that 'nearly killed him' to film while telling dark true tale of Ukrainian orphan Natalia Grace
Fitness influencer issues warning over 'painful' viral beauty trend and claims it makes 'no difference' to your face
Firefighters tackle major industrial building fire in Basildon
Google Cloud’s so-called uninterruptible power supplies caused a six-hour interruption
Google has revealed that a recent six-hour outage at one of its cloudy regions was caused by uninterruptible power supplies not doing their job.…
CodeSOD: Message Oriented Database
Mark was debugging some database querying code, and got a bit confused about what it was actually doing. Specifically, it generated a query block like this:
$statement="declare @status int declare @msg varchar(30) exec @status=sp_doSomething 'arg1', ... select @msg=convert(varchar(10),@status) print @msg "; $result = sybase_query ($statement, $this->connection);Run a stored procedure, capture its return value in a variable, stringify that variable and print it. The select/print must be for debugging, right? Leftover debugging code. Why else would you do something like that?
if (sybase_get_last_message()!=='0') { ... }Oh no. sybase_get_last_message gets the last string printed out by a print statement. This is a pretty bonkers way to get the results of a function or procedure call back, especially when if there are any results (like a return value), they'll be in the $result return value.
Now that said, reading through those functions, it's a little unclear if you can actually get the return value of a stored procedure this way. Without testing it myself (and no, I'm not doing that), we're in a world where this might actually be the best way to do this.
So I'm not 100% sure where the WTF lies. In the developer? In the API designers? Sybase being TRWTF is always a pretty reliable bet. I suppose there's a reason why all those functions are listed as "REMOVED IN PHP 7.0.0", which was was rolled out through 2015. So at least those functions have been dead for a decade.
Gloria Hunniford, 85, reveals shocking reason she was forced to suddenly quit Celebrity Bake Off
James Middleton's unforgettable birthday: How 'blissful' memories of his 'darling' dog Ella still bring comfort
Fears young people facing 'bleak future' in Essex due to lack of opportunities
South Korea reports tech exports surged ahead of Trump tariffs
Tech manufacturers worked overtime in early 2025 to produce hardware before the US imposed tariffs that would increase the prices punters pay for product.…
Erin Patterson is seen for the first time after being charged over alleged fatal mushroom lunch
Grey's Anatomy star Eric Dane makes rare LA outing after being hit by devastating diagnosis
Khloe Kardashian sparks more plastic surgery rumors at Blue Origin space launch
Woman who claimed her dead mother's pension for three years said it was 'a way of keeping her alive'
c2c railway engineering works to cause disruption over Easter weekend with some cancellations and diversions
See the Braintree takeaway shortlisted in the annual Deliveroo Awards
Stansted Airport breaks records with 2.3million customers in March
Clacton Pier to host free Easter fireworks display with rides, soft play and live music
I got the famous salmon sperm facial in South Korea - and I was not disappointed
Chinese Robotaxis Have Government Black Boxes, Approach US Quality
Read more of this story at Slashdot.