homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Mysql large database problem

 4:45 pm on Mar 22, 2008 (gmt 0)

i have come across an interesting problem when..i have to maintain an enormous size of mysql database(actually the number of rows are supposed to be very big)...now the objective is to insert hundreds of new data once to the mysql database ...also it has to be checked that those data are already not there in database...for example

mysql database contains numbers like (2d, 4f,3f5 ,5h2, j5,4l4,2i4,42,44,d4.....and so on....)

and i have to insert one array (34,2d,fdf3,dd,434,f4)...Here "2d" element is already in above database so it must be neglect during insertion....How can i do this in best way without too much over stretching server resource...are their any php function which can do this directly

thank in advance



 5:19 am on Mar 23, 2008 (gmt 0)

If you make the column in the table UNIQUE then it will not allow you to insert the same value twice, it will generate an error which you can then handle accordingly.


 6:09 am on Mar 23, 2008 (gmt 0)

Thanks eelixduppy

i tried the solution suggested by you and it worked ....i think this could be the best way to do it efficiently

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved