Jump to content

CrossMotion

Members
  • Posts

    10
  • Joined

  • Last visited

Posts 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. 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.

  3. 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;
    
  4. 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..

  5. 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.