> http://localhost/geowebworks/php/exp3.php?CCode=caf
> 
> That looks right; caf (for "continent-Africa") is the
> value for the CCode field on the Africa row. But if I
> type something in the form and press submit, the
> change isn't reflected in my MySQL table.

My thought is that the tutorial used the column id as int
auto_increment .  When you changed to CCode (a char), you didn't quote
it in sql.  So this line:

>    $sql = "UPDATE Continents SET
> CCode='$CCode',Name1='$Name1',Type1='$Type1',Group='$Group',Hemisphere='$Hemisphere',ID1='$ID1'
> WHERE CCode=$CCode";

Should be changed to
>    $sql = "UPDATE Continents SET
> CCode='$CCode',Name1='$Name1',Type1='$Type1',Group='$Group',Hemisphere='$Hemisphere',ID1='$ID1'
> WHERE CCode='$CCode'";

Repeat everywhere you're using CCode without quotes.

Ryan Fox

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to