Results 1 to 11 of 11

Thread: MySQL Int?

  1. #1

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    MySQL Int?

    What's the difference between tinyint and int?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  2. #2
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819
    I couldn't find anything about it on the php.net site. I'm guessing a tinyint is a byte, an int is equivelent to vb integer and a big int is equivelent to a long. I'm sure I'm wrong. I'm really learning to hate php.

  3. #3

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I'm obsessed with PHP. It's my new love.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  4. #4
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819
    Good, then maybe you can help me out. What do you know about this?

    http://www.vbforums.com/showthread.p...hreadid=169676

    Also, I want to send myself an e-mail whenever someone registers in my guest book and I have no clue how to do it. I'd like to send them an e-mail as well.

    http://www.paulkjohnson.com/guestbook.htm

  5. #5

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I gave the first one a shot. As for the e-mail thing, I was just intending to look that up because I need to know how to do it as well. If I find something, I'll let you know.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  6. #6

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    PHP Code:
    function send_multiemail ($lc_recipient_email$lc_recipient_name$lc_subject$lc_from_email$lc_from_name$lc_sender$lc_priority$lc_return$lc_html$lc_text)
    {
        
    // send email
        
        
    $boundary "----=_NextPart_000_" uniqid("DO_PHP");

        
    // text
        
    $lc_message .= "--$boundary\n";
        
    $lc_message .= "Content-Type: text/plain; \n\tcharset=\"iso-8859-1\"\n";
        
    $lc_message .= "Content-Transfer-Encoding: 7bit\n";
        
    $lc_message .= $lc_text "\n";

        
    // html
        
    $lc_message .= "--$boundary\n";
        
    $lc_message .= "Content-Type: text/html; \n\tcharset=\"iso-8859-1\"\n";
        
    $lc_message .= "Content-Transfer-Encoding: 7bit\n";
        
    $lc_message .= $lc_html;


        
    // final boundary
        
    $lc_message .= "\n--$boundary--";

        
    /* recipients */
        
    $lc_recipient "$lc_recipient_name <$lc_recipient_email>";

        
    /* subject */
        
    $lc_subject "$lc_subject";

        
    $lc_headers  "From: $lc_from_name <$lc_from_email>\n";
        
    $lc_headers .= "X-Sender: <$lc_sender>\n"
        
    $lc_headers .= "X-Mailer: DataOvation\n"// mailer
        
    $lc_headers .= "Return-Path: <$lc_return>\n";  // Return path for errors
        
    $lc_headers .= "Mime-Version: 1.0\n";
        
    $lc_headers .= "Content-Type: multipart/alternative; boundary=\"$boundary\"\n";
        
    $lc_headers .= "X-Priority: $lc_priority"// Urgent message!
        
        
        
    mail($lc_recipient$lc_subject$lc_message$lc_headers);
            
        
    //end email stuff
        
        
    return "";

    I don't know what all the function variables are, but you can probably figure them out. Recipient, Sender, etc. Seems pretty self explainatory.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  7. #7
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819
    Thanks... it looks to me like you're supposed to choose text or html since there is no switch to choose. In other words, you delete one or the other depending on which way you want to send mail.

    Otherwise it will always be html because that's the order the code is in.... unless I'm not getting something.

  8. #8

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Yeah, I'd have to agree. I just tried to run it, but there was nothing in the body. I even removed the HTML part and just went with the text
    My evil laugh has a squeak in it.

    kristopherwilson.com

  9. #9
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    There's an easy mail example on the php site

    http://www.php.net/manual/en/function.mail.php

    If you want to send plain text, just don't include the extra headers.

    To answer the original question, it would appear tinyint will hold 4 digits and int will hold 11.

  10. #10

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    If you're not doing anything complex, just do:

    PHP Code:
    mail($to$subject$message$headers); 
    For headers, just put something like "From: The Hobo <[email protected]>"
    My evil laugh has a squeak in it.

    kristopherwilson.com

  11. #11

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Chris beat me
    My evil laugh has a squeak in it.

    kristopherwilson.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width