Sedang Disiapkan

PHP Modification / MySQL

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

$insert_fields=array(

"AGENTLIST"=>"0",

"ASSOC"=>"1",

"DESC"=>"2",

"CCR"=>"3",

"JLD"=>"4",

"ID"=>"5",

"CENTER"=>"6"

);

#### Next, I set the ID based on one of the column field values.

$sql="select * from ".$tablepref."listingsdb where listingsdb_id=".$data_elements[5];

$select=mysql_query($sql);

$rows=mysql_num_rows($select);

if($rows==1)

continue;

The whole script is not that long but it includes the other elements you may be curious about.

Kemahiran: PHP

Lihat lebih lanjut: up string, string problems, strip, sql mysql, snippet, php modification, php db, Modification, desc, csv php, php file array, field php, mysql demo php, mysql replace string, php demo, mysql_num_rows, entered values, mysql area, demo works, single php, mysql php demo, sql script mysql, csv array php, php array file, sql file csv

Tentang Majikan:
( 20 ulasan ) American Fork, United States

ID Projek: #376749

Dianugerahkan kepada:

TakeReal

I can strip A-Z chars from "id" field. Or - I can strip all signs, but digits.

$30 USD dalam sehari
(1254 Ulasan)
7.5

15 freelancers are bidding on average $31 for this job

rockerstech

Let me do it

$50 USD dalam 0 hari
(78 Ulasan)
7.6
sureshdevi

I can do this work. Thanks, Suresh

$30 USD dalam sehari
(707 Ulasan)
7.5
php4world

I can strip it.

$30 USD dalam 0 hari
(142 Ulasan)
6.8
mharvinhl

Hi, Let me fix and handle this. Please select me Thank you,

$30 USD dalam 0 hari
(100 Ulasan)
6.2
anode

Ready to do this right now. Thank you.

$30 USD dalam sehari
(106 Ulasan)
6.1
Pektsekye

can you attach the script to have a look at and explain why do you need this A striping?

$30 USD dalam sehari
(107 Ulasan)
5.6
getndone

Plz check PM

$30 USD dalam 0 hari
(39 Ulasan)
5.5
vlip

Hello. I will do my best to help you. Thanks, Eugene.

$30 USD dalam sehari
(23 Ulasan)
4.1
viewsonic1987

I can get this done, check PMB!

$30 USD dalam 0 hari
(1 Ulasan)
1.4
RusOrient

Hello. I can help you

$30 USD dalam 0 hari
(0 Ulasan)
0.0
SohelIDB

Hi I can do it within 2 hours.

$30 USD dalam 2 hari
(0 Ulasan)
0.0
chrisbarnesuk

I trust that the "stripped" generated ID field is not supposed to be used as the primary key....?

$30 USD dalam sehari
(0 Ulasan)
0.0
pritishz

DEAR SIR, SERIOUS BIDDER PLEASE CHECK PMB. REGARDS, PRITISH Z

$30 USD dalam 0 hari
(1 Ulasan)
0.0
Gans225

Just to start with I can prove my skills. More info on the message board.

$30 USD dalam 0 hari
(1 Ulasan)
0.0