Jump to content

zq29

Staff Alumni
  • Posts

    2,752
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by zq29

  1. It all depends on the circumstances. What is the domain name?

     

    http://publicsize.com

    Generally, a name like that wouldn't be worth much at all to most people. It's not a generic word or phrase. It would only be worth anything to someone if they held the trademark, if it was their company name or if they really wanted it for something that couldn't easily be re-branded.

     

    For the reasons above, it's likely only going to be of any value for one person, so they'll either take it or leave it at your asking price, you couldn't really start bidding between multiple parties.

     

    If it had a lot of inbound links or type-in traffic it might increase the value a little bit.

  2. I know more than the basics of JavaScript, but I much prefer to use jQuery - It's just quicker and easier. Plus it has some cool animation effects etc.

     

    Arguably, I could question myself as to why I don't use a PHP framework, though I'd like to think I am much more versed in PHP than I am in JS, and that I'm way too busy to learn one.

  3. Both the Xbox 360 and Playstation 3 allows you to download and watch DVD quality (as well as HD) content. I've never tried it as there isn't a great selection in the UK, but I hear the US get a lot more choice...

     

    Not sure about the quality, but can't you download movies from iTunes store too?

  4. fenway, have you worked with cross-tabs in this fashion before? All of the information I can find demonstrate using cross-tabs to count data (SUM(IF(`x`=`y`,1,0)) as `foo`), not to return rows of text.

     

    My attempt at getting it to return text is as follows:

    SELECT csc.`case_study`, c.`title`
    
    , IF(csc.`header` = 1, `content`,'') as `summary`
    , IF(csc.`header` = 2, `content`,'') as `background`
    , IF(csc.`header` = 3, `content`,'') as `approach`
    
    FROM `case_study` as c INNER JOIN `case_study_content` as csc ON c.`id`=csc.`case_study`
    GROUP BY c.`id`

     

    ...which returns the first bit of content (summary), but the other two fields empty.

     

    idtitlesummarybackgroundappraoch

    1My Case StudySome content[/td][td]

     

    Instead of:

    idtitlesummarybackgroundapproach

    1My Case StudySome contentNULLSome more content

  5. I'm trying to write a query that returns all of the related rows from one table as columns/fields in the result set of a table join. I'm not sure if that makes sense or not, but hopefully my schema below and the result I am trying to achieve can explain it better:

     

     

    CREATE TABLE `case_study` (
      `id` int( NOT NULL auto_increment,
      `title` varchar(160) NOT NULL,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM;
    
    CREATE TABLE `case_study_header` (
      `id` int(3) NOT NULL auto_increment,
      `name` varchar(160) NOT NULL,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM ;
    
    CREATE TABLE `case_study_content` (
      `id` int( NOT NULL auto_increment,
      `case_study` int( NOT NULL,
      `header` int(3) NOT NULL,
      `content` text NOT NULL,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM ;
    
    INSERT INTO `case_study_header` (`id`,`name`) VALUES ('1','Header 1'), ('2','Header 2'), ('3','Header 3');
    
    INSERT INTO `case_study` (`id`,`title`) VALUES ('1','My Case Study');
    
    INSERT INTO `case_study_content` (`id`,`case_study`,`header`,`content`) VALUES ('1','1','1','Some content'), ('2','1','3','Some more content');
    

     

    Trying to get the result:

     

    idtitleHeader 1Header 2Header 3

    1My Case StudySome contentNULLSome more content

     

    I have tried referencing the case_study_content table multiple times in the query with different aliases, but that both didn't work, and wouldn't really be too great as there could be changes in the case_study_header table in the future and the query would need to be manually changed.

     

    I feel it might have something to do with sub queries, unions or something of that nature?

     

    Does anyone understand what I am trying to achieve, and have you any input?

  6. Estimate how long it might take you to build the whole thing, consider time for revisions and changes. Take this number of hours and multiply it by the number of pounds|dolars|euros|whatevers you think an hour of your time is worth. Add any costs of materials, then another x% ontop for a bit of profit.

     

    Nobody can answer this question for you. It might take me more/less time to build it than you, I might think my time is worth more/less than yours, I might demand more/less profit than you.

  7. I learned how to use ImageMagick from here: http://www.imagemagick.org/Usage/

     

    Information on the interfaces to ImageMagick:

    Those links should point out the feature set of each, to which you can base your decision on. I, personally, just use the command line interface via something like exec() to call ImageMagick from within PHP.

     

    On the subject of a new board, I think it has been mentioned, but the answer is an unfortunate no. Not really anything to do with PHP, and not enough demand for it.

  8. Thanks for the input Neil, I didn't even consider using a tool like that - To be fair, I didn't even know of their existence... I have just been reading up on Apache Solr (based on Lucene) and Sphinx.

     

    Sphinx looks easier to implement as it appears to have a better PHP API from what I can tell. I'll install, integrate and see how it works out.

  9. I'm currently working on a website that is made up of numerous areas (blog, events, news, case studies, articles etc.), of which the site search feature is to cover all of these areas and order the results by weighted relevance. I.e. If the search term is found in the title,  it is more relevant than if it was found in the content.

     

    I'm using the full-text search capabilities of MySQL with MATCH() AGAINST() and have created and rebuilt FULLTEXT indexes on fields that I am searching. Below is an example of one of my auto-generated queries that covers one of the many areas...

     

    SELECT t.*, (
            (1.4 * (MATCH(c.`company`) AGAINST('"phpfreaks"' IN BOOLEAN MODE))) + 
            (0.4 * (MATCH(c.`company`) AGAINST('phpfreaks' IN BOOLEAN MODE))) + 
            (1.3 * (MATCH(t.`title`) AGAINST('"phpfreaks"' IN BOOLEAN MODE))) + 
            (0.3 * (MATCH(t.`title`) AGAINST('phpfreaks' IN BOOLEAN MODE))) + 
            (1.1 * (MATCH(ser.`name`,sec.`name`) AGAINST('"phpfreaks"' IN BOOLEAN MODE))) + 
            (0.1 * (MATCH(ser.`name`,sec.`name`) AGAINST('phpfreaks' IN BOOLEAN MODE))) + 
            (1.1 * (MATCH(t.`content`) AGAINST('"phpfreaks"' IN BOOLEAN MODE))) + 
            (0.1 * (MATCH(t.`content`) AGAINST('phpfreaks' IN BOOLEAN MODE)))
        ) as `relevance` 
    FROM 
        `article` as t, 
        `user` as c, 
        `article_category` as tc, 
        `service` as ser, 
        `sector` as sec 
    WHERE 
        MATCH(c.`company`,t.`title`,ser.`name`,sec.`name`,t.`content`) AGAINST('phpfreaks' IN BOOLEAN MODE) 
        AND t.`user`=c.`id` 
        AND tc.`thought_leadership`=t.`id` 
        AND tc.`sector`=sec.`id` 
        AND tc.`service`=ser.`id` 
    GROUP BY t.`id` 
    HAVING `relevance` > 0 
    ORDER BY `relevance` DESC, t.`title` ASC

     

    But this query is searching a few thousand (and counting) articles - It takes a good 30-seconds or so to complete the search. I'm assuming that it is the 8 levels of weighting that is making the query slow. Am I approaching the weighting in an inefficient way? Is there anything else I am doing inefficiently? Is there an alternative solution?

  10. Nice find - Good website too, just been reading all of their articles and subsequently the articles of a few sites they have linked too. Subscribed to their RSS :)

     

    I always use the FAMFAMFAM silk icons in my projects.

  11. Moreover, we have a flat 25% VAT on every single product that's for sale. I suppose that's the reason why we also earn more money, because I don't feel particularly richer than people in other western countries.

     

    Exactly, VAT in the UK is currently at 15% on most product and less/non-existent on a select few. It's all relative I guess.

  12. I was speaking to a group of Danish guys when I was at the 24 Heures du Mans this year, and they were telling us, in comparison to the UK, that you guys have a much higher cost of living over there. Especially when purchasing a new car - He was telling us that you pay a 180% 'luxury tax' on top of the cost of the car (that already includes sales tax / VAT). Crazy!

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