this is my mysql query:
mysql_query("INSERT INTO Coordenadas (ID, LAT, LNG, DESCRICAO) VALUES ($id, $coords[1], $coords[0], $string_cortada)");
when I echo $id, $coords[0], $coords[1] and $string_cortada with this:
echo '</br>$id:'.$id.'</br>coordenadas:'.$coords[1].','.$coords[0].'</br>string: ' . $string_cortada;):
this is what I get:
$id: 1
coordenadas:-22.9028102,-43.2498512
string: marechal rondon
$id: 2
coordenadas:-22.9824202,-43.3605722
string: rua joana angelica
$id: 3
coordenadas:-22.8866218,-43.3699090
string: passarela barra
working data, but when I do:
mysql> select * from coordenadas;
this is the output:
+----+------+-------------+-------------+-----------+------+
| ID | TIPO | LAT | LNG | DESCRICAO | DATA |
+----+------+-------------+-------------+-----------+------+
| 2 | NULL | -22.8544942 | -43.5350719 | 1 | NULL |
+----+------+-------------+-------------+-----------+------+
DESCRICAO didn't work, TIPO didn't work, only LAT and LNG, I can't find why !!
this is coordenadas table description:
mysql> desc coordenadas;
+-----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+----------------+
| ID | int(11) | NO | PRI | NULL | auto_increment |
| TIPO | varchar(15) | YES | | NULL | |
| LAT | double | NO | | NULL | |
| LNG | double | NO | | NULL | |
| DESCRICAO | varchar(150) | YES | | NULL | |
| DATA | date | YES | | NULL | |
+-----------+--------------+------+-----+---------+----------------+
thanks
double) work but the strings (varchar) don't.