<?php

$res = run_query("SELECT id FROM " . $config['table_prefix'] . "modules WHERE `name` = 'social_messages'");
if (!sql_num_rows($res)) {
    run_query("INSERT INTO " . $config['table_prefix'] . "modules (`name`, `version`, `status`) VALUES ('social_messages', '0.1', '1')");
}