View Single Post
  #28  
Old 24th October 2012, 19:20
abdi abdi is offline
Senior Member
 
Join Date: Sep 2012
Posts: 117
Thanks: 0
Thanked 10 Times in 6 Posts
Default

Quote:
Originally Posted by till View Post
The ISPConfig mysql library is here:

/usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php

Your php script should look like this (untested, partly pseudo code):

Code:
<?php

include_once('/usr/local/ispconfig/interface/lib/config.inc.php');
include_once('/usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php');

$db = new db;

$tablename = "database_table_name";
$insert_data = "(a,b,c) values ('a','b','c')";
$index_field = "dbtable_index_field_name";

$db->datalogInsert($tablename, $insert_data, $index_field);

?>
The content of the variables has to be changed to match the data and table that you want to modify.
If the ISP master server is different from the server hosting the script how is it possible to include those files or use them to manipulate the database ...

Which 3 or more files should i copy to the script server (I know i need to adjust the config with database connection settings ...)
Reply With Quote