18.01.2013, 13:23
It depends on what sort of information you're storing in your table, I guess, but the only way to approach this issue of yours is using a SELECT query.
You can, for instance, select the number of rows in the table.
SELECT COUNT(*) FROM table
Then the first and only value returned by the query is the amount of rows. Retrieve this (either using the regular mysql_* functions or maybe the cache feature, check my signature for that) value and see if it is 10. If no, insert the rows.
You can, for instance, select the number of rows in the table.
SELECT COUNT(*) FROM table
Then the first and only value returned by the query is the amount of rows. Retrieve this (either using the regular mysql_* functions or maybe the cache feature, check my signature for that) value and see if it is 10. If no, insert the rows.