When I use a query: select from country where country = "AF"; I`ve got an error (lost connection during query). For example when I use allmost the same query like this (select from country where nos = "100"😉 all works perfect. What can it be??? Help please. P.S. I have a table country with fields: country, no, e98 so table name and field name have a same name.
hmmm, it may be that the names are the same...
try using a alias like this:
SELECT C.Country as ctry FROM Country C
then refer to the field as ctry it worth a try anyway 🙂
Well I`ll try. Thanx a lot.
Hm. MySql said that new field (for example 'cntr')doesn`t exist (Unknown column 'cntr' in 'where clause')
did you try this ?
sql = "SELECT C.Country as ctry FROM Country C";
$qry = mysql_query($sql,$db);
while ($myrow = mysql_fetch_array($qry)) { echo $myrow["ctry"]; }
Were $db is the name of your Database connection.