Even though I don't consider myself a complete newbie.. I didn't want to waste everyone's time in the other forums with such a simple question.
I'm hella sick today.. so my capabilities have been dropped to about the first day I started learning PHP 😛
I'm running a php script that inputs a series of text files, explodes them into an array, then inputs them into a database. One of the fields in the db is the name of the origin file, which I use to see if that file has been added before (therefore preventing double-entries)
My script keeps stalling at this point though..
$result = mysql_query("SELECT count(*) AS num FROM csvfiles WHERE csv_file='$input_file'",$conn);
$num = mysql_result($result,0,"num") or
die("Could not check the CSV files");
if ($num == 1) {
# display error saying the entries been added
} else {
# add the entries
}
Now i'm sure that it's something really really stupid, but i've got bad-ass migraines so am pushing aside my ego and giving in, I need help!!
If you need the rest of the script, just tell me and i'll post it.