|
|
|
เกิด error Notice: Array to string conversion in /home/crm/public_html/project/test/blastmail/test23.php on line 17 ทำไงหรอคะ |
|
|
|
|
|
|
|
Code (PHP)
<?php
$con = mysql_connect("localhost","root","aaa");
if (!$con)
{
die('ติดต่อฐานข้อมูลไม่ได้: ' . mysql_error());
}
mysql_select_db("bb", $con);
$result = mysql_query("SELECT email_address FROM leads");
while($row = mysql_fetch_array($result))
{
//echo $row['Emailaddress'];
//echo "<br />";
$email_address_caps = strtoupper($row);
mysql_query("INSERT INTO Email_addresses(email_address,email_address_caps)
VALUES('$row','$email_address_caps')");
}
////////////////////////////////////////////////////////////////////
$query = mysql_query("SELECT id FROM leads");
while($row2 = mysql_fetch_array($query))
{
mysql_query("INSERT INTO email_addr_bean_rel(bean_id,bean_module,primary_add,reply_to_address)
VALUES('$row2','Leads','1','0')");
}
///////////////////////////////////////////////////
$query4 = mysql_query("select id FROM email_addresses");
while($id_mail = mysql_fetch_array($query4))
{
$mailaddress = mysql_query("SELECT email_address FROM email_addresses WHERE id='$id_mail'");
$id_lead = mysql_query("SELECT id FROM leads WHERE email_address = '$mailaddress'");
mysql_query("INSERT INTO email_addr_bean_rel(email_address_id) VALUES ('$id_mail') WHERE bean_id = '$id_lead' ");
}
?>
Tag : PHP
|
|
|
|
|
|
Date :
2010-08-31 10:31:58 |
By :
ช่วยด้วยค่ะ |
View :
1804 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ลองเปลียนเป็น strtoupper($row["email_address"]);
|
|
|
|
|
Date :
2010-08-31 10:50:02 |
By :
burn |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ไม่ได้อ่ะค่ะ
|
|
|
|
|
Date :
2010-08-31 10:53:52 |
By :
ช่วยด้วยค่ะ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|