Jump to content

CrossMotion

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by CrossMotion

  1. This is a good method. I somtimes generate images on the fly, but this is pretty heavy for the web server. another method is to create the thumbs when you need them and store them in a cache folder. This way you dont create thumbs for images that dont get displayed. Also try to save the original image somewhere too, just in case you need a larger photo in the future.
  2. Hmm so in fact I was running 3004 query’s instead of one. That explains a lot . Thanks for your clear and verry usefull explanation.
  3. Thank you Barand for your input. It tuns out I did not have a index on that field yet. I added it, boosting performance to 15 seconds. Then I tried your query, which runs in 0.0002 sec . Thx again!.
  4. You can try this: SELECT id, title, url, 'table1' AS table FROM table1 WHERE publish=1 ORDER BY id DESC LIMIT 10 UNION SELECT id, title, url, 'table2' AS table FROM table2 WHERE publish=1 ORDER BY id DESC LIMIT 10 I havent tested it, but it should return the first 10 results of both tables and add a field named table to each record to identify wich table the record came from.
  5. If you want the last 20 results from both tables combined, you should use UNION. If you want the last 10 records of table 1 and the last 10 records of table 2, I would just run the 2 queries and merge the data later if needed.
  6. I have a simple SQL query with a group by subquery that runs on a table with 3000 records. It takes aboud 2 minutes to run the code in PHPmyadmin. Is there a way to speed this up? SELECT partnumber, product_id FROM products WHERE partnumber IN ( SELECT partnumber FROM products GROUP BY partnumber HAVING count(*) > 1 ) ORDER BY partnumber;
  7. Those are a lot of questions. If you want a complete solution build for you, you should hire a programmer. But if you have a specific question concerning your code, please feel free to ask.
  8. the strtotime() function mostly gets it right. but I agree with mac_gyver. use a date picker or at least drop-down menus for day, month, year to be 100% safe.
  9. I dont know if there are javascript libraries that can do this, but you need something running on the client side that can process images to achieve this. I think it can be done with a java applet or flash application. but you should ask this in a flash or java forum to know for sure..
  10. It seems you dont send the GET var ID when you load the page. Try loading the page with ?id=1 at the end. If you want to save the id in a session, you need to open the session at each page before you do anything else by adding session_start(); at the top of the page; After that you can just get and set session vars like regulair vars. ( $_SESSION['id'] = $id; and $id = $_SESSION['id']; ) Good Luck
×
×
  • 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.