FULLTEXT search result requirement

2005-08-11 Thread Eric Jensen
I am looking into using the FULLTEXT search features for our FAQ system. Problem is the 50% limitation. We aren't going to have thousands of questions or articles, so the odds of most of the questions/articles matching is high and a desireable effect for us. Is there a away to disable this requi

Remove Unique Key

2005-07-20 Thread Eric Jensen
I have a field that was set as a unique key when created via: UNIQUE KEY `username` (`username`) I no longer want it unique, but can't see a way with ALTER TABLE to remove it. It isn't the Primary Key or an index. The describe looks like this: +--+-+--+-+-+--

Re: Getting first and last day of week

2005-07-13 Thread Eric Jensen
John Trammell wrote: >>Playing around with the date/time functions, I came up with: >> >>select subdate(now(), INTERVAL weekday(now()) DAY); >>select adddate(now(), INTERVAL 6-weekday(now()) DAY); >> >>So once you have a date in the desired week, it's easy to calculate the >>first/last days in th

Getting first and last day of week

2005-07-13 Thread Eric Jensen
Is there an easy way of finding the first and last day of a week? I'm looping through week numbers, I.E. 2005-06-12 is week 23, but for display I would like to know the first and last day of that week. I usually just loop through some days and find them myself, but I am curious to know if there i

Return REG Value

2005-06-20 Thread Eric Jensen
rs from these fields. I've looked at the mysql REGEXP type functions and they just return true or false. I have run into many situations where returning a regular expression modified value would be very handy. Only solution I have found so far is nested string replace functions. Eric Jensen

Re: write query question

2005-05-11 Thread Eric Jensen
So you want 5 contacts for every user? Try this: SELECT COUNT(c.id) AS count, u.username, u.first_name, u.last_name, c.name FROM user AS u, contact AS c WHERE u.id = c.id_user GROUP BY c.id_user HAVING count <= 5 Jerry Swanson wrote: >How to select 5 records(including username, first_name, l

Re: Solution to slow queries

2005-05-10 Thread Eric Jensen
We did something similar for our large statistic tables. The older data that no longer changes would get shipped off into a very fast read only table with a cron job and then that is the table we would generate the reports on. Even with millions of entries it is incredibly fast. Eric Jensen

Re: amPiguous!

2005-05-06 Thread Eric Jensen
The way he is joining tables is fine. You can specify how to link the using ON or you can just say to use a commonly named field with USING. The Problem is with the SELECT pk. That is ambiguous. From what table would you like the pk field? It can be table1.pk or table2.pk. Eric Jensen Rhino

Sum of a Count

2005-04-29 Thread Eric Jensen
Is there a way to group a field together with COUNT() and run a SUM() or AVG() on that? I've looked all over and I can't see a way to combine them, but maybe there is a trickier way? Eric Jensen -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To u

MySQL Group By partial string

2005-04-27 Thread Eric Jensen
n.com/results.aspx?q=things+stuff&FORM=SSRE"; into "search.msn.com" in a SELECT statement? Otherwise I have to loop through them all and parse them myself and run more queries then necessary. Eric Jensen -- MySQL General Mailing List For list archives: http://lists.