Julian: Salle, I certainly do know them and i will redesign so that everytime i do a query i know what i am dealing with. All i need to do is write some more code.
Platte: I scrolled up to check
Decoux: Jop008: keep your questions in channel.
Keilholz: I made it a derived table as follows http://pastebin.com/f5uPtLVE
Ruffo: Now I got for every language an entry I want to make it a view where I can say select * from where m_language.prefix = “NL”
Villalouos: Must I make a big where clause where tooltip.languageID = and so on?
Decoux: Jop008: I can’t access pastebin.com, and I’m headed to bed, so I’ll let someone else help.
Chizmar: Decoux so how to communicatie?
Degrave: Salle: Would you mind telling me what the recipe would be if i wanted to look for a sub-string inside all cols of a row and return those that incude that sub-string? Considering that the cols of a row may contain any number and data type of cols and given that the first col is a PK and off course integer, would it then be wise to use casting?
Delone: I mean casting on the cols other than the first int col.
Vidrio: Naftilos76, not the right thing to do in a database
Callas: Vidrio, how am i supposed to act if i am trying to find a substring in any row in a table? How am i supposed to compare a string with datetimes, integers if not without casting them to char?
Clyatt: Naftilos76: The more you say the more problems with your design approach you reveal
Clyatt: Naftilos76: MySQL is extremely flexible with data types so you very rarely need CAST function
Clyatt: Naftilos76: Try for example: SELECT ‘foo’ = 123, ’10foo’ = 10, ’12’ ‘9foo’; and you will see all they work just fine
Clyatt: Naftilos76: However comparing strings with datetimes seems awfully wrong too
Clyatt: Naftilos76: MySQL always returns DATETIME as string and yes it can be compared to a string just fine, but what is the point to compare random strings to DATETIMEs?
Gallegos: Salle: i am trying to put together a mysql editor/browser so i have to do nasty stuff
Clyatt: Naftilos76: What is the point for example to send MySQL something like WHERE datetime_col LIKE ‘waffle’; ?
Femrite: Salle, what i am trying to do would not normally be done in any website
Clyatt: Naftilos76: You do know in advance this WHERE is not going to match anything so there is no point to waste server resources by sending such query to it
Buchtel: I would probably need to do that if another col was named “breakfast_type”
Clyatt: Naftilos76: You are not following!
Osmer: And sadly that would go through the datetime col as well
Clyatt: Naftilos76: If you have column breakfast_time and you do know it is DATETIME then you do know in advance the above WHERE is not going to return anything
Clyatt: Naftilos76: If you are developing a general purpose editor/browser you better don’t mangle the user input
Clyatt: Naftilos76: casting and converting the types will render your browser/editor useless for any possible purpose
Kastman: Salle: pls let me say this: you are viewing the rows of a table and you need to search for a string that contain anything inside the entire table. Wouldn’t that string have to be compared with all the col contents of each row?
Clyatt: Naftilos76: Take sqlfiddle as example. It converts temporal types like DATETIME, TIMESTAMP, TIME to something ugly so you can’t use it to demonstrate how they work.
Hori: Salle, do you understand my question?
Clyatt: Naftilos76: Compare what sqlfiddle does by mangling the result with what MySQL realy does: http://sqlfiddle.com/#!9/edf27a/3 vs http://pastie.org/10416525
Clyatt: Naftilos76: “you need to search for a string that contain anything inside the entire table” was already addressed by archivist
Clyatt: Naftilos76: Vidrio naftilos76, not the right thing to do in a database
Clyatt: Naftilos76: If you need to do that dump the table to text file and grep it. It is much faster and much more efficient way to do such type of search