[PHP-DB] Date format problem

2003-08-14 Thread Dani Matielo
Hello,

I have a field in my mysql db wich is a timestamp with the format

mmddhhmmss

and I would like to display it like:

dd/mm/

how do I do that?

Thank you in advance,

Dani


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.502 / Virus Database: 300 - Release Date: 18/7/2003



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] MD5 Update

2003-03-16 Thread Dani Matielo
Please, help me with this:


$preencher = mysql_query("SELECT * FROM alemao");
$update = mysql_query("UPDATE alemao SET codigo = md5(concat(nome,email))");

mysql_close ($db);


whats wrong with my code? when I tell him to



he returns "Insert MD5", but nothing happens in the db... whats wrong?

Thank you in advance,

Dani



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Table name is variable

2003-03-13 Thread Dani Matielo
Hello.

I am a begginer in PHP programming and I would appreciate any help.

My problem is the following: I need to make the name of my table a variable.
My thought was simple:

$imprimir = mysql_query("SELECT id, data FROM $tabela",$db);


but it doesnt work... how should i do it?

Thank you in advance,

Dani



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Update MD5 field

2003-03-03 Thread Dani Matielo
Hello, everybody

my problem is the following: I just imported a csv file to a MySQL database
that contains name and email fields. It has about 9k lines on it and I need
a new field that orinally didn't exist called "code" thats suposed to be

MD5(name.email)

I know how to do this for new data, but I don't know how to update all the
old ones I already have there.

Thank you in advance,

Daniela



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php