I am trying to select multiple columns, but not all columns, from a database. All columns that I want to select will start with a word.
So, in pseudo code, I would like to do this:
SELECT "word%" from searchterms where onstate = 1;
More or less. I do not find documentation on how to do this - is this possible in MySQL? Basically, I am trying to keep a list of words on one line with an identifier, and I want to associate all the words with this identifier when I pull out the entries. All words will be connected as a string and transferred to another function in the array / dictionary with their identifier.
I am trying to make as many queries to the FEW database as possible in order to save fast code.
Ok, here is another question for you guys:
They will have a variable number of columns named "word". Will it be faster to make a separate database call for each row, the generated Python query for each row, or will it be faster just SELECT * and use only the columns you need? Can I say SELECT * NOT XYZ?
python sql mysql
Andrew Alexander
source share