php-general Digest 24 Apr 2013 13:02:57 -0000 Issue 8207

Topics (messages 320973 through 320974):

Re: A little confused
        320973 by: Marco Behnke

Re: mysql_connect noob question
        320974 by: Richard Quadling

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Am 23.04.13 12:07, schrieb Chris Knipe:
> Hi All,
>
> $_SESSION['ExpiryDate'] = "2013-04-23";
> echo date_format($_SESSION['ExpiryDate'], "D, \t\h\e jS \o\f M Y");
>
> Required Result: Mon, the 23rd of Apr 2013
>
> I get however:  PHP Warning:  date_format() expects parameter 1 to be
> DateTime, integer given in
>
> I've had a look at the date/time function list, but I cannot seem to find
> any way to convert $_SESSION['ExpiryDate'] to an DateTime??

Take a look at this:
http://de3.php.net/manual/en/datetime.createfromformat.php

Or try this

http://de3.php.net/manual/en/function.strtotime.php

$_SESSION['ExpiryDate'] = "2013-04-23";
$int_timestamp = strtotime($_SESSION['ExpiryDate']);
echo date('D, \t\h\e jS \o\f M Y', $int_timestamp );

Use SINGLE QUOTES!


>
> --
> Chris.
>
>
>


-- 
Marco Behnke
Dipl. Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3

Tel.: 0174 / 9722336
e-Mail: ma...@behnke.biz

Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal

http://www.behnke.biz


Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
Completely different function call().

mysql_connect() - the port is part of the host.

*server*

The MySQL server. It can also include a port number. e.g. "hostname:port"
or a path to a local socket e.g. ":/path/to/socket" for the localhost.

If the PHP directive
mysql.default_host<itss://chm/res/mysql.configuration.html#ini.mysql.default-host>is
undefined (default), then the default value is 'localhost:3306'. In
SQL
safe mode <itss://chm/res/ini.core.html#ini.sql.safe-mode>, this parameter
is ignored and value 'localhost:3306' is always used.


mysqli_connect() - the port is a parameter.



I think you got the answers to the question you asked.




On 23 April 2013 18:14, Jim Giner <jim.gi...@albanyhandball.com> wrote:

> On 4/23/2013 10:39 AM, Glob Design Info wrote:
>
>> Well all, it turns out the *correct* answer to my question, which no one
>> answered, and which only degenerated into a kindergarten-like argument is:
>>
>> "You need to add the port # to the *end* of the mysql_connect() call".
>>
>> i.e.:
>>
>> $link = mysqli_connect( $host, &user, pass, $database, $port );
>>
>> Glad to see the maturity level of posters on this list, as in most of IT
>> these days is that of a bunch of squabling 5-year olds.
>>
>> On 4/23/13 5:47 AM, Tedd Sperling wrote:
>>
>>> On Apr 21, 2013, at 3:33 PM, Glob Design Info <i...@globdesign.com>
>>> wrote:
>>>
>>>  What question did I not answer?
>>>>
>>>
>>> That proves that you're not listening -- you are total waste of time
>>> for anyone trying to help.
>>>
>>> Welcome to my ignore file.
>>>
>>> tedd
>>>
>>> _____________________
>>> tedd.sperl...@gmail.com
>>> http://sperling.com
>>>
>> Tedd - you got off easy on this post.  You should have seen the shouting
> tirade I received offline from this guy.  What a putz!
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Richard Quadling
Twitter : @RQuadling
EE : http://e-e.com/M_248814.html
Zend : http://bit.ly/9O8vFY

--- End Message ---

Reply via email to