Hey,
I'm fairly new to the world of PHP/SQL, so there might be an obvious answer to this, I haven't found one though, but if there is, please feel free to just link to that article/post/whatever.
Ok, now to the issue.
I have an array (which incidentally contains a list of files in a given directory, standard format: 1.jpg,2.jpg,etc).
I wish to input this array into a table in an SQL database. I've figured out the inputting bit, but I've realised that if I run the same script twice, the data will be inputted again.
So my issue is, is there a way to make the PHP script check if a array value already exists in a table, and only add it to the table if it doesn't? Let's say (just to make it interesting... 🙂 that the script needs to make sure that the array data is not already implemented in a table called "filename" AND at the same time have the same "foldername" as the data wanted to be inputted? (Basically, different files in different folders might have the same name, but no two files in the same folder have the same name...)
I hope this makes sense. Any help is much appreciated.
sina
norway