The Heap™ – Consultancy ©®

General on- and off-site discussion for dba.stackexchange.com....
May 16, 2023 13:50
@PaulWhite Thank you very much. That is working for me adapted to my code. And waay beyond my level of SQL. Dammit Jim I'm a dev not a DBA
May 16, 2023 13:14
thanks. I shall leave this place of general chat void of help :)
May 16, 2023 13:07
I've tried all sorts of sub queries and EXISTS. I can get the logic working but due to the clause "if credits=1" I can only get the rows where credits=1
May 16, 2023 13:06
I have a table with column "surname" (string not unique) and column "credits" (tinyint for bool).
I want to select ALL rows which have duplicate surnames but only if at least one of them has "credits=1". If there are dupe surnames but all credits=0 return nothing
May 16, 2023 13:04
hmm its not really worthy of a Q tbh, I dont need a full blown answer just pointer as to what approach or function to use. cheers
May 16, 2023 12:59
Is it ok to ask for some SQL help in here?
Sep 22, 2020 09:24
thanks @bbaird
Sep 18, 2020 16:05
I've read ideas such as: (1) Store everything as varchar; (2) Use Json; Neither of which take my fancy. I had the idea of separate tables for data types, so tbl_int, tbl_string, tbl_float (etc, and not those names) then the main table would store a mapping ID which would map to a specific table. Or fields with the types instead of tables such as field_int, field_float, etc and just store the value in the right field. Both of these seem rough too
Sep 18, 2020 16:04
Is there an elegant way to manage not knowing before hand what data type a MySQL field needs to be? Users can create their own form fields with e.g. float input, text input, int input, so as the form on a user account is not built with the DB tables I can't know the data type before hand.
Sep 18, 2020 15:57
@MichaelGreen thanks, more food for thought
Sep 17, 2020 09:23
yeah, the pro is the live data that can be used as "published" has integrity in the database
Sep 17, 2020 09:20
definitely something I can think about though as it is a solution :)
Sep 17, 2020 09:19
interesting. I guess the only drawback there is managing dupe tables. Not totally dupe as things can be invalid/null etc. But the structure would be duplicated.
Sep 17, 2020 09:04
I feel allowing null in a DB field that is actually not null is wrong, as then DB data integrity relies upon Model/App validation to make sure data has integrity. Any thoughts about this? Or perhaps I need some other layer that temporary stores "in progress" data?
Sep 17, 2020 09:04
I want to allow any form in any tab to be partially saved, to allow an in "progress state". So part of a form or forms will be saved to the DB. However, this means a mandatory form field (i.e. not an empty value) can't have a database field that is "not null" as the partial state might be that mandatory field has no value yet.
Sep 17, 2020 09:03
I have a collection of different HTML forms that collect and save data, each form is in a separate tab on the same page (Javascript just shows a specific form when a tab is selected). Each form in each tab are part of a single module (e.g. "User Questions") and the data collected from all forms is stored against one UserQuestions ID in the DB.
 

Sandbox

Where you can play with chat features (except flagging) and ch...
Oct 29, 2019 23:24
class foo
{
    $var;
}
 

 The Water Cooler

General chit-chat for workplace.stackexchange.com. Feel free t...
May 18, 2018 14:33
thanks for thinking about it tho :)
May 18, 2018 14:33
yeah those were our first words, but we're gonna poke it for a bit in case something magic can happen
May 18, 2018 14:24
we doubt it will be possible, given the laws to protect such data, but not giving up just yet
May 18, 2018 14:23
just trying to find if it's even possible
May 18, 2018 14:23
we'll look at consent later. urm, that sounds dodgy, it's a proof of concept at the moment
May 18, 2018 14:23
so we can caputre their current address and name from a drivers license scan. we're struggling to find how we could get their 3 years previous employment. I feel I might have to email HMRC and ask them, ut fear they'll just say no
May 18, 2018 14:19
was james, which means you should flag it to an admin or you'll enter into rollback war
May 18, 2018 14:15
just needs editing imo
May 18, 2018 14:14
too much profanity for any site really. one little word can be ignored but not multiple
May 18, 2018 14:11
more API based, but any info at all would be good as I cannot find anything whatsoever
May 18, 2018 14:10
hey all. Does anyone have an idea of what UK organisation might release previous employment data? We're looking to build an app that does this in an automated way so couldn't be like gov website with the forms to fill in
 

 Grand Rounds

General discussion for Medical Sciences Stack Exchange: medica...
Sep 26, 2015 13:27
@anongoodnurse Once OP had edited in a valid discussion point to their Question my Answer seemed obsolete, as I was mostly highlighting the vagueness in their Question. If you feel it still adds to the discussion feel free to re-open, or I can if preferable :)
 
Aug 5, 2015 01:13
Nice question! On a lighter/funny side, this reminds me very much of Karl Pilkington: Doppleganger (Youtube vid) Where he states "How would I know which one I am" :D (Link warning: Profanities/potentially offensive content)
 

 English Language Learners

A room to talk about English, linguistics, or anything you wan...
Apr 16, 2015 19:23
Ahh cushty, I can chill with my dialect now then, cheers like mush
Apr 16, 2015 19:21
Wait, what room am I in, this isn't tavern. scared as a northerner with not-so-perfect English...
Apr 16, 2015 19:21
@MARamezani I don't think SE devs have fingernails give the recent changes
Apr 16, 2015 19:20
I really dont mind. as long as the bug is fixed which Shog is sorting (well, eventually...)
Apr 16, 2015 19:15
I'll probs delete my answer soon anyway ;)
Apr 16, 2015 19:14
It's a noobs privvy
Apr 16, 2015 19:14
No, I get all credit :P
Apr 16, 2015 19:10
@MARamezani Howdy
Apr 16, 2015 19:10
Hopefully now it's edited others will remove dvotes too
Apr 16, 2015 19:10
@Lamart I've edited your question, and swapped my downvote to upvote, as it's completely a different thing now. (I just disagreed with increasing rep required for chat room as per your original)