Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. fenway

    [SOLVED] GROUP

    Ah.. .this sounds like the standard groupwise maximum issue... you can't do both without a join.
  2. fenway

    [SOLVED] GROUP

    I'm not sure what you mean... "the row"? It will get many rows... and timestamp is meaningless with aggregate functions.
  3. It would be easier to use a multi-table update rather than a subquery... your inner alias will never be visible to the outer query, hence the eorr message.
  4. Then don't run the query.
  5. Does this help?
  6. Nope... you have to nest all of the REPLACEs. Or you could write a UDF. Or you could install a set of UDFs with PCREs and make it easy.
  7. Then you either need to use Lucene (a 3rd-party solution) or SOUNDEX... but the latter is very tricky depending on where the typo/extra characters are.
  8. I'm sorry, I can't read that at all... could you echo $query_getData?
  9. Well, I still consider that a "procedure" (although it's technically a prepared statement)... which I why I didn't consider it.
  10. Network Solutions is evil. It's better to do the whois lookup yourself (e.g. not via the web).
  11. Then you'll have to replace all of the non-text characters with multiple replaces (or an SP).
  12. fenway

    [SOLVED] GROUP

    Can you give us an example?
  13. You need to do this in two steps: 1) Write the query that will get the most project id based on update. 2) join that table back to the first table.
  14. Why not have another table?
  15. Doesn't that just move the problem to naming the temp table? I'm confused.
  16. Then perhaps I don't understand what's in broad1...
  17. Single-table UPDATE assignments are generally evaluated from left to right... so that should be ok.
  18. You can, but you have to cheat with SUM: sum( if( rating = 'A', 1, 0 ) ) as ratingA, sum( if( rating = 'B', 1, 0 ) ) as ratingB,
  19. Well, not "beside".... simply have each row contain an item_uid which points to items in another table. Then have a bookings table with the start/end dates.
  20. You're obviously not understanding what I'm trying to say. You are storing you images somewhere on your server, in a private (non world readable) directory. So simply dumping out the path into an SRC tag won't do anything, since the browser will have no way to reach it. I will say it again -- you need to write a SEPARATE image serve script that has access to this directory, and simply produces a binary stream of data with the appropriate HTTP headers. If you don't know how to do this, I'm sure there are plenty of tutorials out there -- I'm not versed in PHP. And to the e-mail client, it's STILL just HTML -- forget about the fact that php is generating it and that it's pulling stuff from a back end database. If the HTML page that you produce with PHP doesn't have proper SRC tags, it won't work. Your code probably needs to look like: $query = "SELECT broad_id FROM images_broad"; $result=mysql_query($query); while($row=mysql_fetch_array($result, MYSQL_ASSOC)){ echo '<img src="http://www.your-domain-name.com/foo/bar/image_serve.php?broad_id='.$row['broad_id'].'"/>'; } And then simply have that script take in the ID of that record, look up the path, binary read in the file, and then output a valid http image. Does that make more sense? If not, I can't think of any other ways to explain it... maybe someone else has another way.
  21. Echo $QQQ1. Have you run this query from the CLI or phpmyadmin? Perhaps it's correct. Also, why the cross join?
  22. What do you mean "so the img tag would not work"? You're using PHP to write out HTML code. That's the only way to display an image in HTML. I think you're confusing your e-mail page with your image serve script.
  23. Well, you can easily join the tables on jobid and group by exec.
  24. There is... 7 what? WHERE Date BETWEEN CURDATE() and (CURDATE() + INTERVAL 7 DAY)
  25. Well, let's see $QQQ1. What makes you think there are matching rows?
×
×
  • 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.