[PHP-DB] Sorting the result

2002-02-27 Thread Kristjan Kanarik
Hi, I've come across a problem and I'm affraid that I'm lacking the skills of writing proper SQL queries in order to solve this. I'm building a little search engine for my site (yes, from scratch! It doesn't have to be the best, but I think that for my personal use it will be enough) and the bit

Re: [PHP-DB] Sorting the result

2002-02-28 Thread Kristjan Kanarik
_text from articles where article_text LIKE '%$q%' ORDER BY Q ACCOURANCE IN article_text DESC") or die (mysql_error()); How to make MySQL to understand this 'Q ACCOURANCE IN article_text' is the tricky part for me. Kristjan > : - Original Message - > : Fr

[PHP-DB] Next birthday?

2002-03-08 Thread Kristjan Kanarik
I have a table called 'members' with a field (among many others) 'member_dob' - the birthday of a particular member. The data type of this field is date (-mm-dd). What I'd like to do now is to fetch one particular row from the database (I am using MySQL 3.23.37) - namely the row of the member

RE: [PHP-DB] Next birthday?

2002-03-08 Thread Kristjan Kanarik
Y member_dob DESC LIMIT 1 > > then take that result and: > > SELECT member.* > FROM `member` > WHERE member_dob = '$result_from_previous_query' > ORDER BY last_name > > This really seems like overkill. This query would be much simpler if you > just showed everyone&