LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-11-2010, 06:40 AM   #16
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Original Poster
Rep: Reputation: Disabled

@jlinkels:

Thanks. I had read those functions earlier but was not clear how to use them. Will try those and then get back to you.
 
Old 02-11-2010, 07:00 AM   #17
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jlinkels View Post
Use strtotime to convert your date to a timestamp. Either use this in your query:
Code:
"UPDATE blah SET mydate=FROM_UNIXTIME($timestamp)"
or convert the timestamp in PHP using the date function with the "Y:m:d H:i:s" format.

jlinkels
You are the man buddy. strtotime, and date function did the trick. No need to run the mysql query.
Thanks a lot.

PS: Assuming you to be a male.
 
Old 02-11-2010, 08:22 PM   #18
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
If you found the post useful, please click the Thanks button.

jlinkels
 
Old 02-11-2010, 11:10 PM   #19
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Original Poster
Rep: Reputation: Disabled
There goes the thanks to you.

Anyhow. I am doing something that you would not suggest me to do right now that I am just couple of days old. But I want to do it. I have got an attendance machine in our organization. It is ZM300 build on Linux Kernel 2.4. I want to use php to connect to it using sockets. i tried fsockopen. I found it from google. I can open socket with it. But I do not know how to proceed. There are only two ports open on the machine. One is telnet port 23 and 4368. But for telnet I need username and password which I do not have neither can I create one. Has anyone used this machine before? or tried to open a socket on some machine like this?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] HTML Form that sends data entered to a bash script as variables simplified Programming 2 12-01-2009 03:35 PM
capture html form data blizunt7 Programming 12 06-19-2005 08:31 PM
PHP: html Form Select function problem camlinux Programming 2 05-15-2005 08:23 PM
PHP and HTML Form Post Savahn Programming 12 06-30-2004 03:15 PM
Simple php script with html form not working. sinsoush Programming 4 04-01-2004 08:02 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration