Can anyone help me convert this to MySQL? Trying to learn this on my own is killing me.
<?
$SQL = odbc_exec("$conn","select * from PORTFOLIO_DATA where LOGIN='$login'");
if(odbc_fetch_row($SQL))
{
$redirect=odbc_result($SQL,"REDIRECT");
setcookie("id", odbc_result($SQL, "ID"));
}
else
{
$SQL=odbc_exec("$conn","select WRONG from WRONG_ID where ID=1");
$newwrong=odbc_result($SQL,'WRONG');
$newwrong=$newwrong+1;
$SQL=odbc_exec("$conn","update WRONG_ID set WRONG=$newwrong where ID=1");
$SQL = odbc_exec("$conn","INSERT INTO [WRONG_ID] (WRONG) VALUES ('$login')");
$newdate = date("F j, Y, g:i a");
}
?>