[high]* DaNIEL MeNTED wishes the quick answers were long.
[/high]
Off to go look for code.
Hmm... found and modified this for columns. Is there a cleaner way to do it?
PHP Code:
$query = $vbulletin->db->query("SHOW COLUMNS FROM " . TABLE_PREFIX . "table LIKE 'column'") or die(mysql_error());
if (mysql_num_rows($query) == 0) { insert column }
And for rows in a table:
PHP Code:
$query = $vbulletin->db->query("SELECT * FROM " . TABLE_PREFIX . "table LIMIT 1") or die(mysql_error());
if (mysql_num_rows($query) == 0) { add rows }
Make sense?