Reply to Re: Paradox DB and TIME field

Your name:

Reply:


Posted by Rik on 10/24/06 16:15

Thorak wrote:
> //---------------------------------------------------
> //--------------------------------------------
>
> # SQL Statement.
> $qry = 'SELECT OD.OrderID,
> OD.CustomerID,
> OD.SalePersonID,
> OD.DueDate,
> OD.DueTime,
> EMP.EmployeeID,
> EMP.FirstName
> FROM "Order.DB" OD, "Employee.DB" EMP
> WHERE EMP.EmployeeID = OD.SalePersonID;
>
> $qry = odbc_prepare($db, $qry);
> $exe_id = odbc_execute($qry);
>
> while(odbc_fetch_row($qry)){
>
> $DueDate = odbc_result($qry,'DueDate');
> $DueTime = odbc_result($qry,'DueTime');
>
> }
>
> echo $DueDate.' - '.$DueTime;

var_dump($DueDate); //and
var_dump($DueTime);

Then we'll know what kind of data it holds.

(BTW: I'd make a single column Due, with both date & time, either in you
database's native format (haven't used Paradox), or as a unix timestamp.

Also, in MySQL, tablenames are not quoted (""), but backticked (``). Don't
know wether that is the case with Paradox....?

Furthermore, in a query using joins I don't trust the fieldname to be the
columnname anymore, so try:

OD.DueDate AS 'DueDate',
OD.DueTime AS 'DueTime',

As a last remark: this is not the exact code you used to get 1899-12-30,
because this code would fail.... HOW do you get to 1899-12-30?
--
Grtz,

Rik Wasmus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация