473,406 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

problem in fetching date from database

25
There is a date column in database table in the format as "2010-05-12 15:35:08". I am trying to fetch this field using:
Expand|Select|Wrap|Line Numbers
  1.  while($res =  mysql_fetch_array($sql))
  2.   {
  3.    $data = $res['LoginDate']; 
  4.   }
  5.  
It does not work.
May 20 '10 #1
2 1495
chathura86
227 100+
What was the output you got? Are you sure that you have records for the query? Try the below and post the result:
Expand|Select|Wrap|Line Numbers
  1.  while($res =  mysql_fetch_array($sql))
  2.   {
  3.    var_dump($res); 
  4.   }
May 20 '10 #2
Atli
5,058 Expert 4TB
@bandy
Hey.

You will have to be more specific. What you posted is far from being enough for us to actually reply with anything useful. We need details, like:

What did you expect this to do? What did it actually do?
Did you get any errors? Warnings? (Are they even turned on?)
May 21 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Andres Baravalle | last post by:
Hi, I have a problem using a URL fetching algorithm (HTTP 1.0). To download an image, I used to use this algorithm: <?php Header("Content-type: image/gif"); $referer =...
6
by: Pete | last post by:
Hi Guys I have a form which must calc the difference between 2 date fields and return the result in a third field. I have the following code but it does not seem to work. Can anyone tell this...
3
by: Dustin Wilson | last post by:
I have a problem with the following line of code. rstOutput! = FormatDateTime("January 1, 2004", vbLongDate) When I run this on my computer at home it runs without problem but when I run it at...
2
by: Andy | last post by:
Hello, I have a question regarding how to format a date in VB so that I can call it from a query and get results. I'm calling functions in the query because that was the only way I found I could...
3
by: Marauderz | last post by:
Hello guys, got a little question regarding the regional language settings . Anyway I got a Windows 2003 Server machine that was installed with the date format "dd/MM/yyyy" and location still...
0
by: RadhakrishnanR | last post by:
HI ALL, My .NET application devloped in C# used mainly class file (OOAD) and user controls etc and it is desktop application not web based application. Database is SQL server 2000. Now I have...
5
manoj9849967222
by: manoj9849967222 | last post by:
Hi All I have a problem with date format. I have designed a table with one of the field as Date. when i enter the date it is comming in mm/dd/yyyy format. Is there a way to change the format to...
0
by: mahesh123 | last post by:
Hi, I am new to use the crystal reports8.0. I am facing the problem regarding the database connection through the ADO Connection. Suppose my database name is "sample.pra"(due to some security...
2
by: akshaycjoshi | last post by:
Hi, I am developing one application which requires me to compare date.The dataabse being MS access 2003. When i execute the query in c# it does not show any record ,the date although matches with...
3
by: Jozo | last post by:
Dear All, This is my first time on this site and I am very happy! I have problem regarding to date (new or old ms access document) My problem is that access changes date after 09/11 to 11/09 i...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.