I have a small single PHP file snippet that loads CSV data into an OpenRealty database. This works fine, no problems at all. What I need is for a string replace to be considered before the data is entered.
Meaning, if the ID field has 50458510A, I need it to strip the ALPHA first so it shows up as 50458510 before adding it to the DB.
To make this easy, I have the script, the database and everything else already installed on my demo domain.
#### Summary portion of script #####
This is just a summary of the script area needing modification but basically it goes like this.
#### First, I have an array that matches the CSV file columns
#### Next, I set the ID based on one of the column field values.
$sql="select * from ".$tablepref."listingsdb where listingsdb_id=".$data_elements;
The whole script is not that long but it includes the other elements you may be curious about.