-1
I am trying to test if my database has connected correctly from a query, but apparently mysql_query() does not execute and changes my table. This is my code:
<?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
Thank you very much!
– Gazelle