.  

 

 

.
.

23 / 03 / 2017

Usuarios conectados: 13

Cargando documento...

Buscar:

.

Este Sitio:

Principal

Dreamweaver

Fireworks

JavaScript

CSS

Sonido

Artículos

Links

E-ufemismos

Descargas

Historial

 

Mailing List:

Suscríbete a la lista de correo, No practico spamming y ofrece algunas ventajas.

Pulsa aquí para saber más y suscribirte.

 

Recomendados:

Tecnorama >Tutoriales Dreamweaver

 

Using PHP Server Formats and MySQL Dates

Versión para imprimir | Translate this page

OK: You're using the "PHP Server Formats" extension, but you can get nothing because you're using TIMESTAMP fields in your database and the extension will only work with UNIX Timestamps and MySQL Date and Date/Time fields. This short tutorial will tell you how to make it all work, just adding a bit of code to your queries.

Let's have a look at this query:

Let's assume that the field "date" is using a MySQL's 'TIMESTAMP' format. All we have to do is adding the UNIX_TIMESTAMP() function and an alias, to make it all work as expected:

 

It's done: From now on, the "date" field in your Server Behaviors panel will contain the date in a UNIX Timestamp format. Now, just insert it as the rest of the records in your document and apply the Date/Time formats included in the extension (select the Unix timestamp option). It will work now.

 

Personal opinion: Since PHP doesn't have native functions to manage MySQL date and time formats, I find more useful to convert the data into UNIX Timestamps, as PHP has quite a lot of functions to work with them..

The "PHP Server Formats" extension is located here.

 

¿Comentarios? 51, de momento. Mostrando 1 ->5

1.- Hi, Neat post. There's a problem with your website in internet explorer, would test this IE still is the market leader and a good portion of people will miss your great writing due to this problem. cbkgbakddgcdkfac

2.- Hey there! I realize this is somewhat offtopic but I had to ask. fdfeaggdffkb

3.- You have brought up a very excellent details , regards for the post. ffckbcgckdce

4.- Thanks for another magnificent post. Where else may just anybody get that kind of info in such a perfect manner of writing? I have a presentation next week, and I'm at the look for such information. ggfeaecaekfb

5.- I all the time used to read paragraph in news papers but now as I am a user of web thus from now I am using net for posts, thanks to web. eddeggcabaee

« Previous | 1 - 5 | 6 - 10 | 11 - 15 | 16 - 20 | 21 - 25 | 26 - 30 | 31 - 35 | 36 - 40 | 41 - 45 | 46 - 50 | Next »

Añade tu comentario



Escribe el código de la imagen superior:

:

Tutoriales Dreamweaver

-El muy buscado Menú desplegable

-¿Qué $%&$% es 'SSI'?

-Utilizar tablas de excel para actualizar tablas en html.

-Plantillas en DW MX: Regiones opcionales.

-Adaptar tablas a la ventana.

-Vista diseño para formatos no reconocidos

-Carga de imagenes en orden

-Mi primera Extensión

-Rollover remoto ('Disjointed Rollover')

-Iframes vs. Frames

-Contenido dinámico en celdas

-DW MX: Repeating Tables

-DW MX: Practica el Cloaking

-DW MX: CSS en tiempo Diseño

-Buscar y Reemplazar en Dreamweaver

-Menú dinámico

-Collaborative Dreamweaver: Design Notes and Files Panel

-Using PHP Server Formats and MySQL Dates

-Creando un Newsticker

-Generate Excel files with DWMX/PHP/MySQL (part 1)

-Manejo de fechas en PHP y MySQL

-Generate Excel files with DWMX/PHP/MySQL (part 2)

-Manejo de Fechas en consultas a MySQL

-Showing all records by default in a results page (PHP)

-Retrieving data using AHAH (1)

-Retrieving data using AHAH (2)

-Retrieving data using AHAH (3)

TECNORAMA es simplemente una página personal. No sirve ni de promoción del autor ni cosas por el estilo.
Todos los códigos, textos y tutoriales son de libre uso mientras se mencione al autor (no es mucho pedir)
Este sitio es compatible con IE6/NS6/Mozilla1.0
Para contactar, puedes enviarme un e-mail a tecnorama@hotmail.com