Skip to content
Advertisement

dash character in mysql MATCH

I have a table of documents numbered by year / series, like this: 13-201 (this would be document 201 in 2013). I want to do a MATCH AGAINST full text query for this table, so a user could grab a list …

SQL : select values between multiple ranges

I have a table like the one below… ID Price ==== ====== 1 1000 2 2000 3 4000 4 5000 Now I need a query to select values between 500 and 1500 And between 2500 and 4500. i.e. like …

Sqlite get max id not working (?)

Im using this: But my query is empty. I have also tried this (This one works): But obviusly my query only contains the max_id key. What am I doing wrong with the first one? Answer You need to add another level of select for the MAX, like this: A better approach would be to order by id in descending order,

How can a query select dates from only a specific academic year?

This may be simple, but I cannot figure out the correct and simplest way to query a table which contains a date col to return the rows in which the date belongs to the current academic year. Knowing that for academic year I mean the period from the 1st of September of a year to the 31st of august of

Advertisement