Thought earlier that I could get by on just plain SQL.
> Php needed. I'm getting a parse error on the "if"
> line.
> This is supposed to be a trigger then before
> transaction counts the number of rows , id already
> inserted, if exceeded , kick back error message , halt
> transaction.
> Not sure where I need to go with this statement to
> make it work. Ideas , help, suggestions welcome!
> //start trigger Trigger1
> function KT_TriggerSTARTER_Trigger1(&$tNG) {
> $result = mysql_query("SELECT LurkTitleTim.LurkID
> WHERE
> LurkID='$new_input'");
> if ($row=mysql_fetch_row($result) >= 5) { error- data
> already exists }
>
> else { go ahead and add data with INSERT statement
> }
> }
if htis is exact code, you're error is at "error- data already exists",
which is not a valid statement.
assuming its not exact code, you'll need to send that code to be able to
tell.
HTH
Jeff
> Thank you ,
> Stuart
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]