<?
function InsertGearAndMethod($fgid,$fg,$lo,$gt,$desc)
{
	include "connect.inc.php";
	
	$sqlchk = "select * from gearandmethod where fishinggear='$fg'";
	$qrychk = mysql_query($sqlchk);
	$numchk = mysql_num_rows($qrychk);
	if($numchk < 1)
	{
	$sqlinsert = "insert gearandmethod(fgid,fishinggear,localname,gtid,gdesc) values($fgid,'$fg','$lo','$gt','$desc')";
	//echo $sqlinsert;
	mysql_query($sqlinsert) or die("error");
	}
	else
	{
	require_once("usr_function.php");
	ErrMsg("Fishing gear and method is duplicate!");
	}
}
function EditGearAndMethod($fgid,$fg,$lo,$gt,$desc)
{
	include "connect.inc.php";
	$sqledit = "update gearandmethod set fishinggear='$fg',localname='$lo',gtid='$gt',gdesc='$desc' where fgid='$fgid'";
	//echo $sqleditzone;
	mysql_query($sqledit) or die(mysql_error());
}
function DeleteGearAndMethod($fgid)
{
	include "connect.inc.php";
	$sqldelete = "delete from gearandmethod where fgid='$fgid'";
	//echo $sqldelete;
	mysql_query($sqldelete) or die(mysql_error());
}
?>