save datetime in mysql using php
I have table in mysql database which have field with datatype is datetime. I want to save the datetime in this minute, for this I use " Now() ", but it does not work, It just save 000000000000 in databaes. ...
I have table in mysql database which have field with datatype is datetime. I want to save the datetime in this minute, for this I use " Now() ", but it does not work, It just save 000000000000 in databaes. ...
I am setting up PHP on my Tomcatserver using the PECL-servlet (PHP/PECL-version 5.2.5). The server now sucessfully handles real PHP-files, but i am having a problem with requests for nonexistent pages. A request for such a page, f.ex: http://www.mydomain.com/nonexistentfile.php, causes the servlet to raise a java.io.IOException, which i...
I have a text file that reads: 9123 Bellvue Court 5931 Walnut Creek rd. Andrew Bailey Chris Drew Earl Fred Gerald Henry Ida Jake Koman Larry Manny Nomar Omar Perry Quest Raphael State Telleman Uruvian Vixan Whales Xavier Yellow Zebra What I need to do is I need to create a A-Z listing... so: # A B C D E F G H I J K L M N O P Q R S T ...
Hello, I have a website where I am wanting to get some query results through AJAX and JSON, but I have absolutely no idea how to do it, I have this function, public function category() { $table = $this->uri->segment(2); $content_id = $this->uri->segment(3); $data['content'] = $this->site_model->get_content($tabl...
As a developer that's used to static typing I usually let the compiler tell me if the code is correct, logic flaws excluded of course. But when refactoring PHP I find it is VERY hard to know that my code is correct. There always seem to be some lingering reference to some method or member somewhere that get's broken and doesn't show up ...
Hi, I'm building a small site, that needs to support 2 languages for the same page. Each language has different buttons on the page, the buttons are basically some images with text inside. The positioning of the buttons is done using a CSS file, one for every language. Question is how do I implement the changing of button for every imag...
I have been working with a piece of code for youtube style URL's but I have found a bug and I am hoping someone can show me the most efficient way to fix it. function alphaID($in, $to_num = false, $pad_up = false, $passKey = null) { static $passcache; if(empty($passcache)) $passcache = array(); $index = ...
I have a large website that I have time to convert to a nice custom-framework that I can build to my needs. I want to build my own, and not use something like Smarty because I'd like to... know how all the guts of it work cut any and all bloat learn it, just for kicks But, after building it in different ways, several times...I keep f...
digest = HMAC.digest(Digest.new(SHA1), Base64.decode64(key), HashString) return Base64.encode64(digest.to_s()).chomp() What would the above be in PHP? ...
Hi, Im not sure what this type of number is '1.3122278540256E+18' but how can i expand it into an integer? Thanks!! ...
Hi, If i use the "cursor"=>"-1" i get pagination, at which i can read the next_cursor. I get 1.312477885269E+18 when i read next_cursor. To call again, i set the cursor as the next_cursor which was returned back from the previous call, 1.312477885269E+18 - do i send it in this format, or somehow do i have to convert this into an int? ...
I have been making Wordpress themes for a year or two and keep running into things I need to keep in mind when trying to make my themes as compatible and flexible as possible with their settings, plugins, etc. Is there a resource that keeps a checklist of all the "don't forgets" of Wordpress theming? What things do you try to keep in m...
I am confused as to why: echo log10(238328) / log10(62); results in 3 but echo floor(log10(238328) / log10(62)); results in 2 I know floor rounds down but I thought it was only for decimal numbers. How can I get an answer of 3 out of the latter statment whilst still normally rounding down? ...
I'm planning an application that allow users to create a specific type of website. I wanted to link account names to 'account.myapp.com'. Going to 'account.myapp.com' will serve up a website. I haven't a clue on how to map this. I'll be using Code Igniter as my development tool. I would like to give users the ability to add a registered...
A little background: There is a game I play on the net called doomlord... I'm in a Clan. I'm trying to present stats on the players that are relevant for us. For this I have to retrieve the names of the players from a web page that I can only access after a login. The page is: www.doomlord.net/index.php?m=szovetseg&sub=reszletes_statiszt...
Hi all I am submitting from a form to another php page which is supposed to process it. The problem is that the $_POST is often empty when I try to read it. This is the form: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/...
Where can I find PHP coding convention references for PHP coding standards? ...
Hello, Does anyone know why the favicon dissapears Background: I have my site made according to mvc So, I will have a frontcontroller and a main layout All the other views will be loaded in the $content variable from the main layout. The main layout holds the tags withe the link rel "shortcut favicon". The favicon dissapears when I...
Hello All I have started a site up using html only, switched it over to php to make my life easier and have used the following code in the .htaccess to ensure all users (who may have bookmarked) are still seeing the right pages: Options +FollowSymlinks RewriteEngine on RewriteRule ^(.+)\.html$ http://domain.com/$1.php [R,NC] Now I am...
I was reading about how to detect the encoding of a file in PHP, and on some blog or somewhere, it was suggested to do this: if (function_exists('mb_detect_encoding')) { function is_utf8($str) { // do stuff using the mb* libraries } } else { function is_utf8($str) { // do stuff manually } } To me this f...