troubleshooting Question

Notice: Array to String Conversion

Avatar of DS928
DS928Flag for United States of America asked on
PHPMySQL Server
26 Comments1 Solution4096 ViewsLast Modified:
I am getting this error.  What could be causing it?

Database error: Invalid SQL: SELECT * FROM customer_order where order_id= 112167
 Notice: Array to string conversion in /home/content/d/s/t/dstr3/html/MH/Clean/includes/database.php on line 114
 
nMySQL Error: 1064 (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '> Notice: Array to string conversion in /home/content/d/s/t/dstr3/htm' at line 1)
nSession halted.

It's on the attached page.

I think it's here.
$lines[] = "#2*". $order["order_type_id"] ."*".date('M j, Y @ g:i A',strtotime($order["order_date"])).";"
			. $order["delivery_time"] .' '. date("d-m-y", strtotime($order["order_date"])).";*"
			. $order["order_id"]."*".implode('%%', $items)."*".str_replace(',', ' ', $order["last_name"]).";"
			. str_replace( array(',', ';') , ' ', $order["street_name"])."%%".$order["phone"].";*"
			. str_replace(';', ' ', $order["comments"])."%%%%%%#";
			}

and here...
$lines = "%232*". $order["order_type_id"] ."*".$order["order_id"] ."*". implode(';', $items)."*"
	.str_replace(',', ' ', $order["last_name"]).";"
	.str_replace( array(',', ';') , ' ', $order["street_name"]).";"
	.$order["delivery_time"] .' '. date("d-m-Y", strtotime($order["order_date"])).";"
	.$order["phone"]."*".str_replace(';', ' ', $order["comments"])."%23";
database.php
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 26 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 26 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros