Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. You're inserting a value larger than is allowed for this column type, so it's being truncated... SHOW WARNINGS will tell you this.
  2. To this end, use LIKE '%Easy Hummus%' and see if the results change.
  3. No, not with a mysql query alone.
  4. fenway

    php error

    That's likely because you used LOCAL and your my.cnf file doesn't allow it.
  5. You can use DESCRIBE TABLE, SHOW COLUMNS, or the I_S tables to query the schema, but there's no ADD IF EXISTS.. .you'll need to do it in 2 steps. But you'd better not be making dynamic column names...
  6. That's not any better than a derived table.
  7. Rendering isn't mysql. You can decide how you want mysql to behave at this stage -- throw an error or not -- but it's up to you (your code) how to handle this.
  8. Databases don't lie... if that's what it says, that's what it is... but I depends how you're "counting" the records. What's "it"?
  9. We do.... trust us. No need for a "quiz".
  10. First, define "not work" -- error, or no results? Second, you'd benefit from proper JOIN syntax using ON clauses; easier on the eye & the parser, since it keeps the join conditions separate from the where clause: $statement = "SELECT * FROM device INNER JOIN device_eo ON ( device.device_id = device_eo.device_id ) INNER JOIN eo ON ( device_eo.executive_order = eo.executive_order ) INNER JOIN eo_engine_family ON ( eo.executive_order = eo_engine_family.executive_order ) INNER JOIN engine_family ON ( eo_engine_family.engine_family_name = engine_family.engine_family_name ) WHERE engine_family.engine_year ='".mysql_real_escape_string($year)."' AND engine_family.displacement ='".mysql_real_escape_string($disp)."' AND engine_family.engine_mfr ='".mysql_real_escape_string($mfr)."' ".$order.""; But can I see the valued of $statement in both cases?
  11. Or use LOAD DATA INFILE.
  12. That's actually the only way to do it... you can't use LIMIT in a JOIN any other way.
  13. Just clicked the "TOPIC SOLVED" button on the bottom-right of the button set on the bottom of the page (near the quick reply area). We specifically don't want old posts changed.
  14. This is a php syntax issue... topic locked.
  15. LONGTEXT? You sure you can't use a 65K varchar? TEXT fields have all sorts of performance issues... but I digress. If you need to count more than one appearance of a word per field, you're pooched; you can't do this without a UDF.
  16. fenway

    INNER JOIN

    No, I'm referring to the 5-6 topics at the head of the post listing for the mysql forum board that are permanently displayed. In particular, the one labelled "for beginners".
  17. You can use MOD/DIV to cheat and limit the number that way... but when it comes down to it, you're going to have to tell the user at some point, which means there has to be application logic, too.
  18. Pretend it doesn't exist... it's a silly throwback, should be deprecated.
  19. Strict mode will complain, but that's not what it's meant for.
  20. No problem... often times, simplicity is synonymous with efficiency.
  21. I think you have to tell php it's handling binary data.
  22. Or just used OPTIONALLY ENCLOSED BY, or whatever it's called.
  23. Sounds like you need to put this into your ON clause... with 6 tables, you should really be using proper join syntax.
  24. fenway

    INNER JOIN

    Huh?
  25. That's true for the equality only... for the inequality, mysql will silently do this type conversion for you.
×
×
  • 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.