preventing duplicate entries

From: Date: Tue, 26 Jun 2001 18:22:22 +0000
Subject: preventing duplicate entries
Groups: php.windows 
Request: Send a blank email to php-windows+get-8060@lists.php.net to get a copy of this message
I want to prevent duplicate entries into my mysql database which holds invertory of all network eqpt at my site. Engineers access it thru netscape and the query insert is done via pdp [below]. I will place the script into php, any pointers on this would be appreciated. THX! Pete <html> <body> <?php require("fedb.inc"); mysql_connect(localhost,$user,$password); @mysql_select_db($db) or die( "Unable to select database"); /*Insert into database */ mysql_query ("INSERT INTO asset (site_id, hostname, device, model, serial, ip, dept, mhz, ram, hd_size, os_ver, status, data_port, pp_port, hub_port, digi_port, csmim_port, tprmim_port, xyplex_port, comments, fe) VALUES ('$site_id', '$hostname', '$device', '$model', '$serial', '$ip', '$dept', '$mhz', '$ram', '$hd_size', '$os_ver', '$status', '$data_port', '$pp_port', '$hub_port', '$digi_port', '$csmim_port', '$tprmim_port', '$xyplex_port', '$comments', '$fe') "); print ("Thanks for submitting your device."); ?> <a href='index.html'><b>Home</b></a> </body> </html> -- _______________________________________ Pete Kuczynski Principal Field Engineer DHL Airways Inc. Infrastructure Technology & Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767

« previous php.windows (#8060) next »