/    Sign up×
Community /Pin to ProfileBookmark

handling duplicate entry

I am using php & mssql server in devloping scheduling and booking system.
I have a problem when i come to handle duplicate entry in mssql server
I used to handle this in mysql using mysql_errno() for duplicate entry.. but in mssql it gives a message instead. And there is no such mssql_errorno() function in mssql…
I was told to use stored procedure, but i have no idea ho to do that and to invoke sp function in php

i really do not like to handle that by checking the word exist or not,i think it might slow the db when it grows.
here is my table:
table name: working_days
fields:
wd_date(pk),wd_year,wd_emp_id(fk),wd_shift_id(fk),wd_on_off
all of them of type int and the field wd_date is storing timestamp value

Thanks

to post a comment
PHP

1 Comments(s)

×

Success!

Help @themoon spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...