Jump to content

sirmanson

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Posts posted by sirmanson

  1. This depends on TONS of different things, but here are a few to watch our for :

     

    1) Your server - Is it shared amongst other users? How fast is the CPU/Disk/Memory?

    2) How well optimized are your queries, table structures, indexes etc..

    3) Are you using persistent connections?

    4) Do you have other applications running on the server?

  2. I don\'t believe this is possible in one query. I scoured the mySQL page and couldn\'t find anything about this. I know it is definately possible using oracle, but not currently in mySQL. You could easily parse this recordset into PHP and get what you need.

  3. I\'m not following what you mean? If the user visits then their record would not get archived. Basically the live table would have all of your \"fresh\" records and the archive would have everything else. If you needed to do some sort of reporting on all of the customers you could just UNION the two tables.

  4. Referrers ------

    This is the easy one. I would archive everything from this table into another on a daily baisis. Make sure that you are running all of your stats out of the archive table so you don\'t degrade the \"production\" performance.

     

    Customers --------

    I would pick a field like last_visit and prune everyone that hasn\'t visited in XX days. Move each of these records into an archive table. If you use this method you should just to a delete from the archive table for each record that exists (and is moving) from the live table. This will keep you from getting duplicate records in the archive.

  5. The way they are doing that is by creating a folder and putting an index.php in it.

     

    Example :

    www.webglimmer.com/community

     

    would be showing www.webglimmer.com/community/index.php

  6. I would recommend storing some sort of access level in your tables and letting mySQL filter the results based on that.

     

     

    select t1.*,t2.*, t3.*

    from table1 t1,

    inner join table2 t2 on t1.id=t2.id

    inner join table3 t3 on t2.id=t3.id

    where t1.user_level<=$user_level

    and t2.user_level<=$user_level

    and t2.user_level<=$user_level

    order by t1.date_published

  7. You need to use an outer join : Here is an example

     

    SELECT e.id, e.posterid, e.titletext, m.username

    FROM phpnews_news e

    LEFT JOIN phpnews_posters m ON e.posterid = m.id

    ORDER BY e.id DESC

     

    This will pull all of the data from phpnews_news and only the records in phpnews_posters that match. If you wanted to reverse this (pull all from posters and only those in news that match) you could change it to a RIGHT JOIN

     

    http://www.mysql.com/doc/en/JOIN.html

×
×
  • 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.