Jump to content

Service ID Not Found


r0adra93

Recommended Posts

I am working on creating an actionhook to insert data into a database shared by multiple hosting accounts.

 

The code works, however, as soon as the shared hosting account is created I recieve an error message stating "Service ID Not Found".

 

I am thinking that maybe this error occures from a conflict due to the opening of two seperate databases, maybe I am wrong. I just need some additional tips here.

 

Thanks!

 

Here is my code:

 

function generate_variables($vars) {

$tri_systemurl = "http://" . $vars['params']['domain'] . "/";

$tri_afflink = "?aff=" . $vars['params']['clientsdetails']['userid'];

$tri_afflinkamp = "&aff=" . $vars['params']['clientsdetails']['userid'];

$tri_db_info['username'] = "<REMOVED>";

$tri_db_info['password'] = "<REMOVED>";

$tri_db_info['host'] = "localhost";

$tri_db_info['dbname'] = "<REMOVED>";

$tri_db_info['connection'] = mysql_connect($tri_db_info['host'], $tri_db_info['username'], $tri_db_info['password']) or die(mysql_error());

$tri_query = "INSERT INTO sites VALUES('0','$tri_systemurl','$tri_afflink','$tri_afflinkamp');";

@mysql_db_query($tri_db_info['dbname'], $tri_query, $tri_db_info['connection']);

mysql_close($tri_db_info['connection']);

}

add_hook("AfterModuleCreate",1,"generate_variables");

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated