Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Why bother doing it all in sql since you're already forced to deserialize() in php?`
  2. My pleasure... sorry for the 2-week delay.
  3. Please indicate how this was "solved" before marking it such.
  4. Ok... seems to work for me... try this: CREATE OR REPLACE VIEW dup_checks AS SELECT LEFT(tbr.Forename, 1) AS Forename, tbr.Surname, LEFT(tbr.Addr1, 5) AS Addr1, tbr.Postcode FROM test_suppress INNER JOIN tbr use index (`both`) ON (test_suppress.surname=tbr.surname AND test_suppress.postcode=tbr.postcode) where LEFT(test_suppress.forename, 1)=LEFT(tbr.forename, 1) AND LEFT(test_suppress.addr1, 5)=LEFT(tbr.addr1, 5) And select * from test_suppress INNER JOIN dup_checks use index (`both`) ON (test_suppress.surname=dup_checks.surname AND test_suppress.postcode=dup_checks.postcode) where LEFT(test_suppress.forename, 1)=LEFT(dup_checks.forename, 1) AND LEFT(test_suppress.addr1, 5)=LEFT(dup_checks.addr1, 5) Hope that helps.
  5. Not exactly... no join condition! Try: select c.user_id, count(*) as cnt from cars as c inner join user as u on ( u.id = c.user_id ) group by c.user_id having cnt < 3
  6. Isn't here an "upload"?
  7. select user_id, count(*) as cnt from cars group by user_id having cnt < 3
  8. Oops, missed the "everything" part...
  9. Only if you want to judge the quality of these forums based on the rantings of a single individual... Entirely uncalled for -- if you don't understand, then don't respond. You've been warned.
  10. Sounds like you need some cross joins....
  11. That error message means you didn't execute a sucessful query... but MAX(id) is the better way to go... the question is why you need this.
  12. I'm not sure what you mean by this.
  13. You have multiple statements in your TRIGGER, so you can't use ";" to end your statements and your trigger -- you need to change the delimiter first.
  14. Silly me... both is a reserved keyword... I had no idea. SELECT e.* FROM events AS e INNER JOIN ( SELECT `organization_id` FROM `events` WHERE MATCH (events.theme, events.contact_name, events.contact_email, events.contact_phone) AGAINST ('southern' IN BOOLEAN MODE) UNION ALL SELECT `id` AS organization_id FROM `organizations` WHERE MATCH (organizations.church_name, organizations.city, organizations.contact_name, organizations.email) AGAINST ('southern' IN BOOLEAN MODE) ) AS sub ON ( sub.organization_id = e.organization_id ) My bad.
  15. You assume? Didn't you check? How are they separated?
  16. That's great -- the EXPLAIN should indicate that FULLTEXT is being used for both ... and I would all UNION ALL to save a filesort. All of you need to do know is join the events to able to this union'ed table: SELECT e.* FROM events INNER JOIN ((SELECT `organization_id` FROM `events` WHERE MATCH (events.theme, events.contact_name, events.contact_email, events.contact_phone) AGAINST ('southern' IN BOOLEAN MODE)) UNION ALL (SELECT `id` AS organization_id FROM `organizations` WHERE MATCH (organizations.church_name, organizations.city, organizations.contact_name, organizations.email) AGAINST ('southern' IN BOOLEAN MODE)) ) AS both ON ( both.organization_id = e.organization_id )
  17. Yes, but the error message you posted is from the query in the commented code -- so what's the actual problem?
  18. Forget the JOIN for a minute... just UNION each table with it's own FULLTEXT index.
  19. I still have no idea what the M_addtn field looks like, I'm sorry. You're describing the destination, not hte souce.
  20. Huh? I'm talking about: /*$entered = "UPDATE $player SET gm1 1 = 'Giants' WHERE id ='10' LIMIT 1" ; $entered = "UPDATE $player SET gm1 1 = $pick WHERE id = '$myid'";//$p_name $result = mysql_query($entered, $link) or die (mysql_error());*/ [code] [/code]
  21. the atrribute for it says BINARY, thats all that is list Field: m_addtn Type: blob Attribute: binary Null: No The format of the data being stored inside this field.
  22. Well, a FULLTEXT index (or any index, for that matter) cannot cross tables, so that's why you need to use separate MATCH...AGAINST clauses. But why not just UNION the results of two separate queries?
  23. That doesn't answer my question... what is the format of this BLOB field?
  24. Not only that, but your column name has a space in it????
  25. Good ol' DOS->UNIX issues.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.