Jump to content

luca200

Members
  • Posts

    129
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male
  • Location
    Italy

luca200's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. No, it will not. Just be sure you have an index on user_id column in videoViews
  2. I don't see the problem. You just need a text column. Or am I missing something?
  3. Of course you need a join. By the way, your mistake on the previous code (a part from it being badly designed) was using $i instead of 0 when trying to retrieve the category
  4. In MySQL 4.0, it's enough to declare a column as timestamp (as far as you have just one of those in your table). It will be set to the current timestamp when you insert a row, just omit it in the INSERT statement. Be aware that it will be updated when you update the row, unless you explicitly set it to its current value
  5. Why not writing a bunch of 'mysqli_'-named functions by yourself, just to wrap mysql_ ones? I think that would be better than changing all function calls in your code, especially if you should switch back to mysqli, some day
  6. Replacing WHERE with HAVING should be enough
  7. Latest? How do you decide which is the latest? There is no data that can show it
  8. Looks like you're joining about ten table, but it's hard to understand not knowing what you want to do. Anyway that syntax is obviously incorrect, as the ON clause must be together with the explicit JOIN clause
  9. I hope you have full control over the server. The usual hosting server will not allow you this, I'm afraid. Basically you need two things: the first is having remote users enabled by mysql server security settings. The second is having remote ip connections on the mysql server port (3306 usually) allowed by the server firewall. Do you think you can manage it?
  10. I think it will not work with mysql 4.0 Anyway, if you have enough of the marketid value and don't need the other columns of the table, the inner select of his query can work it out for you.
  11. you should add GROUP BY prizes.ID at the end of the query
  12. It's not phpMyAdmin not allowing it, it's MySql itself. Why would you need a second autoincrement value? The first one is not good enough?
  13. I think you should add indexes on: - oid on refund table - catalogid on oitems table
  14. Of course, getting a random value does NOT mean that mysql will shuffle results to provide you a different one each time!! It simply uses an algorithm to get out your results, not taking care about ordering rows beyond the ordering fields you provided. This can easily mean that as long as you repeat the IDENTICAL query on the IDENTICAL table, you will get the same ordering. But as you change something (and adding a LIMIT clause you ARE changing something), the algorithm can change too, so the results will.
×
×
  • 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.