nimzie Posted February 26, 2008 Share Posted February 26, 2008 Hi, as my subject says, this is likely something I should be aware of. A simple import script which is something like: for($i=1; $i<sizeof($fcontents); $i++) { $line = trim($fcontents[$i]); $arr = explode( $delim , $line); $arr = explode( "\t" , $line); $sql = "insert into origin ( StoreID, OrderID, OrderNumber, OrderDate, IpAddress, Currency, CustomerID, BillFirstName, BillLastName,BillEmail,BillPhone,BillFax,BillCompany,BillAddress,BillCity,BillState,BillCountry, BillZIP,ShipFirstName,ShipLastName,ShipEmail,ShipPhone,ShipFax,ShipCompany,ShipAddress,ShipCity, ShipState,ShipCountry,ShipZip,Status,Comments,ShippingMethod,ShippingCost,ShippingTaxes,HandlingCost, ShippingDate,DeliveryDate,ValidationCode,PaymentMethod,PaymentCost,Coupon,AddOns,AddonValues,PaymentTaxes, CardNumber,CardName,CardExpiry,TransactionDate,PreAuthNumber,AuthNumber,ReferenceNumber,Questions,ShortQuestions, ItemID,ItemName,ItemCode,ItemType,Options,OptionCode,Quantity,ItemPrice,Taxes,Width,Length,Height,LengthUnit, Weight,WeightUnit,Language ) values (' " . implode ( "','" , $arr) . "')"; One of the fields contained "Mary's store". It failed the SQL Statement. Can anyone share some tips on how to get around this? Thanks. Adam Quote Link to comment Share on other sites More sharing options...
tinker Posted February 26, 2008 Share Posted February 26, 2008 This 'might' help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.