Jump to content

[SOLVED] date returned from mysql


cleary1981

Recommended Posts

Im not quite sure how I would implement this. Heres the code I have

 

<?php
require "config.php";

$proj = $_REQUEST['proj'];
$sql = "SELECT * FROM project WHERE project_name='$proj'";
$result = mysql_query($sql) or trigger_error(mysql_error());
$row = mysql_fetch_assoc($result);

$return = $row['proj_id']."%". $row['project_name']."%". $row['form']."%". $row['access']."%". $row['cable_entry']."%". $row['ip_rating']."%". $row['fault_rating']."%". $row['company_name']."%". $row['proj_manager']."%". $row['deadline'];

echo $return;
?>

 

$row['deadline'] contains the date that I want to format.

$return = $row['proj_id']."%". $row['project_name']."%". $row['form']."%". $row['access']."%". $row['cable_entry']."%". $row['ip_rating']."%". $row['fault_rating']."%". $row['company_name']."%". $row['proj_manager']."%". date('d-m-Y',strtotime($row['deadline']));


Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.