Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: simple MySQL prob

by screamingeagle (Curate)
on Mar 03, 2002 at 21:44 UTC ( #149020=note: print w/ replies, xml ) Need Help??


in reply to simple MySQL prob

u can do this to check if a value exists :
fire an SQL query before the the INSERT statement to check whether the value exists :

select count(*) VALEXISTS from tablename where fld = 'fldvalue'
if the value does not exist, the VALEXISTS column will be 0. depending on this value, u can decide whether to fire the INSERT statement or not
:-)


Comment on Re: simple MySQL prob
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://149020]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (15)
As of 2014-10-21 14:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (104 votes), past polls