缺少参数?

I am getting a MySQL invalid Query error in my scripts. It doesn't list the line the error occurs on so I am not sure if it is a SQL syntax error or if it can't find the connection. To try and catch the error I made an error function. However, even that errors with a missing arg: Warning: Missing argument 1 for senderroremail(), calle

function senderroremail($line) {
    mail('xxx@xxx.co.uk', 'IntegrityCheck script error', mysql_error().' error');
    die('Invalid query: ' . mysql_error().' '.$line );  
}

if (!$squid_conn_int)     {senderroremail(__LINE__);} 

I have the senderroremail after every query, insert, update, etc.

Isn't that error saying that _LINE_ isn't returning a value?

What does print(_LINE_); get you? Have you tried something like senderroremail(777); ?