I am trying to test if my database has connected properly from a query, but apparently mysql_query () does not execute and does not change my table. My code is this:
<?php
//conecta a base de dados
$dbc = mysql_connect('localhost', 'dbweb', 'notime');
if(!$dbc)
{
die("Not connected : " . mysql_error());
}
//seleciona a base de dados
$db_select = mysql_select_db('goaheadmakemyday', $dbc);
if($db_select)
{
die("Can't connect : " . mysql_error());
}
//teste
$query = "UPDATE Colaborador SET Nome='Ola' WHERE ColNum='0'";
$resultado = mysql_query($query);
//Pequena parte da minha tabela:
//ColNum Nome
//0 Simeão Lopes
//1 Olavo Bettencourt
//2 Sandro Vidal