How to prepare date for wpdb insert query

it gives me a headache for past 24h so I need you help.

My scrape returns 2 arrays (test-case).

Array ( [0] => Array ( 
[title] => Abacosun Instytut Urody 
[kategoria] => Salony kosmetyczne 
[adres] => 80-254 Gdańsk, Partyzantów 3 (Wrzeszcz) 
[phone] => 58 341-90-90 
[email] => 
[www] => 
[desc] => Dystrybutor ) 

[1] => Array ( 
[title] => Mathias Hair Design 
[kategoria] => Fryzjerzy 
[adres] => 81-387 Gdynia, Antoniego Abrahama 74 
 [phone] => 533-328-555 
[email] => 
[www] => 
[desc] => Instytut Kérastase Mathias ) 

No matter what I try I can’t send “adres” to the databse. wpdb returns (bool)false and I can’t squeez anything more out of it.

As the data is pretty much the same (the format at least) why it works for the second one but not for the first one and is there a way to somehow prepare data for INSERT query and I don’t mean sanitazing/triming/exploding.

As always thanks guys.

Source: wpdb

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.