Closed

PHP script to check duplication in my DB

I have two sets of data that I receive daily. I want to check each data set as it comes in (it arrives with seconds interval between each record throughout the day) for duplicate entries. And remove the duplicates from the database. The script should check against the past 30 days data.

The coding is in PHP.

Some notes from the previous dev are below:

A. With [url removed, login to view] -> [url removed, login to view]

(1) It select data from log table based conditions given

Example :

$sql = "SELECT DISTINCT * FROM log WHERE timestamp>='$lastTimestamp'

AND timestamp<='$now' ORDER BY timestamp DESC";

(2) It will fetch all records return

- field client_sent is an serialized array, needed unserialized to

array back -> array A

- array A will have field email E

- these data of array A will write to csv file --> [url removed, login to view]

[url removed, login to view] [url removed, login to view] -> [url removed, login to view]

It do the same with [url removed, login to view], but for table log1 , and export to [url removed, login to view]

So, we need the way to make [url removed, login to view] and [url removed, login to view] not contain duplicate

data (based email).Recommend :

+ using a table as source to compare , example log

+ when fetch data for log1, check if email existed in log, don't export

Habilidades: PHP

Veja mais: dev php, sql duplicates, my entries, sql table remove, php file array, database remove duplicates, php table array, php table csv, php script sql, php email check, php file write array, sql select order, php write csv daily, check duplicate, csv array php, check compare, php array file, compare table data, sql script data set, script sql table

Acerca do Empregador:
( 59 comentários ) Australia

ID do Projeto: #3379107

27 freelancers estão ofertando em média $62 para esse trabalho

hoangvandungbk

See private message.

$68 USD in 2 dias
(319 Comentários)
7.1
sergioes

See private message.

$84.15 USD in 2 dias
(245 Comentários)
7.1
stevebryant

See private message.

$55.25 USD in 2 dias
(515 Comentários)
6.7
s17

See private message.

$63.75 USD in 2 dias
(396 Comentários)
6.6
mmuhasan

See private message.

$29.75 USD in 2 dias
(139 Comentários)
6.6
gisterpages

See private message.

$51 USD in 2 dias
(58 Comentários)
6.1
matfizvw

See private message.

$59.5 USD in 2 dias
(63 Comentários)
6.1
netcometvw

See private message.

$68 USD in 2 dias
(41 Comentários)
5.7
toinnisfreesl

See private message.

$42.5 USD in 2 dias
(38 Comentários)
5.3
unieyes48

See private message.

$12.75 USD in 2 dias
(37 Comentários)
4.9
jparimal

See private message.

$76.5 USD in 2 dias
(18 Comentários)
4.8
HitekCode

See private message.

$84.15 USD in 2 dias
(49 Comentários)
4.8
sirajcse

See private message.

$8.5 USD in 2 dias
(36 Comentários)
4.8
crazenators

See private message.

$140.25 USD in 2 dias
(8 Comentários)
4.7
shobhitsingh1

See private message.

$170 USD in 2 dias
(24 Comentários)
4.5
engmalaa

See private message.

$21.25 USD in 2 dias
(22 Comentários)
4.4
marvelspider

See private message.

$42.5 USD in 2 dias
(15 Comentários)
3.9
sytneivw

See private message.

$34 USD in 2 dias
(26 Comentários)
3.9
moizjam

See private message.

$170 USD in 2 dias
(16 Comentários)
3.9
sditfac

See private message.

$17 USD in 2 dias
(19 Comentários)
3.9