Jump to content
Larry Ullman's Book Forums

Shoun

Members
  • Posts

    6
  • Joined

  • Last visited

Shoun's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Paul, Hey Don't ask me about PEAR , I'm an absolute Idiot in PHP, I just know Like openGL Library for Game Programming, stdio.h, iostream.h for C,C++ programming PEAR is a Industry standard Library for Efficient PHP application. It has lots of PHP functions and classes(not like built-in mail() or is_array())which are used by most experienced PHP programmer and the most popular. That's all I know. If someone want to use it he has to download it and installed, But it's not for the babies. Anyone correct me if I'm wrong. Greetings Shoun
  2. Paul, Good Morning(though it's afternoon here ) Let me tell you and everyone about my experience about Mercury Mail Server. You know what, I thought I could use my XAMPP as a live server, and use Mercury Mail Server as Server like Gmail or Yahoo I thought business would be good. I spent three days to get Mercury Mail even sending a mail. First I created two test user namely newuser@locahost, newuser2@localhost (n.b not .com) from Configuration > Manage local users I only wrote a PHP code like this <?php mail('newuser2@localhost', 'subject', 'the body', 'From: newuser@localhost'); ?> It responded Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() Failed to connect to mailserver But Mercury was open what could happen. I struggled to find out may be mercury was open but offline. File menu > Enter offline mode. But It is online. I clicked File menu > Enter offline mode Then again clicked File menu > Leaver offline mode, Then the mail was send with no errors or warnings. There is a window in the Mercury Mail Server called 'Mercury Core Process'. Where you can see sending email, to or from but not the body. To see the body use a mail Client like Mozilla Thunderbird.(Dude!!! you should use a Mail Client, and it is the best and free....) So, Next. If I can send mail between two localusers may be I can send between a localuser to gmail. I couldn't. I searched the internet, viewed youtube videos but nothing worked. I configured a lot in the mercury mail. Nothing......so i can't send message from inside to outside but inside to inside. I learned that the mail() function is not the perfect way to send mail, there is a class in the PEAR library blah..blah..blah In this case Larry will be the one who can show us the light.
  3. Antonio, Thanks a lot for your help. Hey, It's really working now!!! As you did, I tried to use like that DATE_FORMAT(MAX(CONVERT_TZ........ Instead of MAX(DATE_FORMAT(CONVERT_TZ........ It was so nice of you thanks.
  4. Hi Paul, I think I was having the same problem like you. I also tried to send email from my newuser@localhost account to my @gmail.com account and vice versa. I think you should never use mercury mail for production purposes, if I'm wrong, are you using any mail client like Mozilla Thunderbird. I visited your last post where you embedded a you tube video. I also searched for that and searched the blog to get mercury mail working. They too talked about scary things like IP's, setting, ports etc. Nothing worked, It's very complex. And the logic you used of making two user like test1@localhost and test2@localhost is not bad, I also tried it. I sent a email through php code using mail() functions the 'Mercury Core Process' window in the Mercury mail server showed that the email was sent. And the message It self can be watched via a mail client like Mozilla Thunderbird.
  5. Congratulations for you century. In the message book example Mr. Larry used a complex query. I spent hours to understand it properly Thanks what you wrote in your post. But I want to do it as Book does all in one query, which is efficient rather that making three of four simple queries. The query was OK and I want all of them as one not the last reply only as the book does. The example you sent( to Antonio) is totally fine. But Mr. Larry used MAX(), DATE_FORMAT(), CONVERT_TZ()functions to make it more user friendly. Problems are there! Did you used those functions? Thanks for your reply, It taught me a new things though.
  6. Sir, The first query in the message board example you used, is having a part: MAX(DATE_FORMAT($last, '%e-%b-%y %l:%i %p')) AS last, MIN(DATE_FORMAT($first, '%e-%b-%y %l:%i %p')) AS first $first/$last = "CONVERT_TZ(p.posted_on, 'UTC', '{$_SESSION['user_tz']}')"; It seems like it should work properly, but it doesn't. For Example, suppose: posted_on column in the posts table has three dates for a thread(I mean only three posts) 2007-10-29 04:15:52 2007-10-30 04:20:52 2007-11-02 04:30:30 your query should return the last one, right? Because it is the last date but instead the second one is returning. I think the function is working only on the day of the month rather than the whole date. Can anyone help me with that? How can I through this? I'm stuck. I have been experimenting with this the whole day. Please.... Is there any printed error the query. or is there any other way to do so. I really want to do that 'cause I think showing last reply is important.
×
×
  • Create New...