Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $filename= '/path/customers.csv';
- if (file_exists($filename)) {
- $file = fopen($filename, 'r');
- while (($line = fgetcsv($file)) !== FALSE) {
- $customerid = $line[0];
- $customer_name = $line[1];
- // this is where I am needing assistance, or guidance if I am way off base
- // I need to query each "estimates" post and find it's "customerid" field value,
- // if it matches $customerid - $line[0] from the CSV, I want to update the "estimates"
- // custom post type's "customer_name" field with the value of $customer_name - $line[1]
- }
- }
Add Comment
Please, Sign In to add comment