hi all i have two servers each having a table in them, i'm able to connect to them using php. But when i try to select the values from one table of a server to insert them into another table in another server that is not working even i had given all the privileges can one show me how to do that..... - <?php
-
-
$dblink2 = mysql_pconnect('test1.deftlogic.com', 'dtestone_ipab','!*D-pD)g5)FJ'); // connect server 2
-
-
mysql_select_db('dtestone_db_2025', $dblink2); // select database 2
-
-
echo $dblink2;
-
-
if(!$dblink2)
-
{
-
echo "not connected";
-
}
-
else echo "db2 connected";
-
-
$dblink1 = mysql_connect('localhost', 'dtestfor_ipab','IaMzieU3#b%$'); // connect server 1
-
mysql_select_db('dtestfor_IPAB_db',$dblink1); // select database 1
-
-
if(!$dblink1)
-
{
-
echo "not connected";
-
}
-
else echo "db1 connected";
-
echo "<br/>";
-
-
echo $dblink1;
-
-
$rs=mysql_query("INSERT INTO dtestfor_IPAB_db.bd_paidabribe (city, dept, amount) SELECT
-
SUBSTRING_INDEX(message, ',', 1),
-
SUBSTRING_INDEX(SUBSTRING_INDEX(message, ',', 2), ',', -1),
-
SUBSTRING_INDEX(message, ',', -1))as 'ma'
-
FROM dtestone_db_2025.sms");
-
");
-
-
echo mysql_error();
-
?>
0 1429 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Frank Natoli |
last post by:
Have two tables "abc" and "xyz", where "xyz" is a superset, column-wise, of
"abc".
Is there any simple way to inject all the rows of "abc" into "xyz"?
Tried "insert into xyz select * from abc"...
|
by: Alexander |
last post by:
Hi there!
I need to write an sql statement, that inserts a blank (empty) row into a
table.
I tried
"Insert Into tabname",
"Insert Into tabname () VALUES ()"
"Insert Into tabname VALUES ()"
|
by: David |
last post by:
I am trying to insert an employee number into the EmpNbr field in my
main table from a form where I add a new employee to my employee table.
I was hoping this command would work, but it isn't.
...
|
by: Samy K |
last post by:
I'm having a bit of problems entering a new row to an
access database and what I would like to know is do I have
to assign certain values in my INSERT INTO SQL statement.
I have read about the...
|
by: pb648174 |
last post by:
I have the following basic statements being executed:
Create a temp table, #TempPaging
Insert Into #TempPaging (Col1, Col2)
Select Col1, Col2 From SomeOtherTable Order By Col2, Col1
Select...
|
by: ltanvo |
last post by:
Hi,
I try to run several insert into sql statements in direct MS access at same time. For ex.
INSERT INTO Mytable(F1, F2) VALUES('V11', 'V12')
INSERT INTO Mytable(F1, F2) VALUES('V21', 'V22')...
|
by: underground |
last post by:
I wonder if possible on page load to query the value of a specific colmn and insert the result into another table. My query looks like so
<?
include("include/session.php");
?>
<?
$usr =...
|
by: boss1 |
last post by:
hi all,
i m new in php.i have a problem that is
i m using a php form where i can retrieve one field value from one table in oracle db by ajax and its working properly. but i need to insert the...
|
by: EJO |
last post by:
with sql 2000 enterprise
Trying to build a stored procedure that will take the rows of a parent
table, insert them into another table as well as the rows from a child
table to insert into...
|
by: questionit |
last post by:
Hi
How do i write multiple values in a single column, using INSERT INTO
I have a listbox and i want all the selected values from that listbox inserted into a table column
INSERT INTO...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
| |