I copied the code to a backup file-name. deleted the original file & then copied short sections of code to the original file, test, copy, test etc.. Ive now got working code - all is Ok but still dont know why it was blank/result... i asked AI to compare the files & apparently there was a rogue exit command (but this apparently didnt trigger the shutdown routine - register_shutdown_function('shutdownINS_MYSQL') ) (Wonder why AI didnt find the rogue exit before :) ) -- Gordon.