Hi all: I'm not sure if this script is really running out of memory because of MySQL doesn't have enough memory, or if it's because it's a poorly written script. I was hoping that someone might be able to take a look at the script for me and let me know if they could find any ways to optimize it. The Script: http://xtrinsic.com/scripting/engine.04.txt (previous versions at 03.txt and 02.txt). The script in action: http://www.tri-drs.org/engine.phtml I seem to get either Bork, bork, bork. All I do is bork OR You came to see me about a zero? The first error message is associated with: $data_check = "select row_id from lookup where word_id = $gotten_word_id and table_id = $table_name"; $data_back = mysql_query($data_check) or die ("Bork, bork, bork. All I do is bork. $eachword[$k]". mysql_error()); $data_check_array = mysql_fetch_array($data_back); The second is associated with (which actually comes first in the script): $word_check = "select word_id from words where word = '$eachword[$k]'"; $any_words = mysql_query($word_check) or die ("You came to see me about a zero. $eachword[$k] ...". mysql_error()); $anything_back = mysql_num_rows($any_words); These are both "select"s... I have no problem with any of my insert queries. Although I've put in the PHP mysql_error(), I've only seen an error once. And it said something to the effect of "MySQL is out of memory." I didn't think to copy and paste it because I thought I'd be able to replicate it. :( Any help on this would be very much appreciated!!! emma --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php