Results 1 to 18 of 18

Thread: PHP and MySQL

  1. #1

    Thread Starter
    Fanatic Member Gimlin's Avatar
    Join Date
    Dec 2001
    Location
    Hell
    Posts
    734

    PHP and MySQL

    Could someone create a list of most used and most useful. PHP and MySQL functions.

    I want to know this because, I want to print off the manuals section for the important functions only, since I dont have 100 pages of paper

    Anyway, see what you can do .

    thanks a bunch

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I did the same thing. I searched through the manual for functions I found useful, put them in a Word document, and printed it up when I was done. But I guess it all depends on what you do in PHP and MySQL to decide what's useful.

    This is currently what "my manual" looks like:

    PHP Function Reference (Updated: 5/9/2002)

    String Functions in PHP

    · string chr (int ascii)
    · array explode (string separator, string string [, int limit])
    · string implode (string glue, array pieces) || alias join (same)
    · string ltrim (string str [, string charlist])
    · string rtrim (string str [, string charlist])
    · string str_repeat ( string input, int multiplier)
    · mixed str_replace (mixed search, mixed replace, mixed subject)
    · int strlen (string str)
    · string str_pad ( string input, int pad_length [, string pad_string [, int pad_type]])
    · int strpos (string haystack, string needle [, int offset])
    · string strrev (string string)
    · int strrpos (string haystack, char needle)
    · string strtolower (string str)
    · string strtoupper (string str)
    · string substr (string string, int start [, int length])
    · string trim (string str [, string charlist])

    Array Functions in PHP

    · array array ([mixed ...])
    · array array_merge (array array1, array array2 [, array ...])
    · mixed array_rand (array input [, int num_req])
    · array array_reverse (array array [, bool preserve_keys])
    · int count (mixed var) || alias sizeof (same)
    · bool in_array ( mixed needle, array haystack [, bool strict])
    · array range (mixed low, mixed high)
    · void sort (array array [, int sort_flags])


    File Functions in PHP

    · int chmod (string filename, int mode)
    · int copy (string source, string dest)
    · bool fclose (int fp)
    · array file (string filename [, int use_include_path])
    · bool file_exists (string filename)
    · int filesize (string filename)
    · int fopen (string filename, string mode [, int use_include_path])
    · string fread (int fp, int length)
    · int fwrite (int fp, string string [, int length])
    · int mkdir (string pathname, int mode)
    · bool rmdir (string dirname)

    HTTP Functions in PHP

    · int header (string string [, bool replace])
    · bool headers_sent (void)
    · int setcookie (string name [, string value [, int expire [, string path [, string domain [, int secure]]]]])

    Mathematical Functions in PHP

    · mixed abs (mixed number)
    · int bindec (string binary_string)
    · float ceil (float value)
    · string decbin (int number)
    · string dechex (int number)
    · float floor (float value)
    · int hexdec (string hex_string)
    · number pow (number base, number exp)
    · int rand ([int min, int max])
    · float round (float val [, int precision])

    Variable Functions in PHP

    · boolean empty (mixed var)
    · bool is_array (mixed var)
    · bool is_bool (mixed var)
    · bool is_float (mixed var) || Alias is_double (same)
    · bool is_int (mixed var) || Alias is_integer (same)
    · bool is_resource (mixed var)
    · bool is_string (mixed var)
    · string strval (mixed var)

    MySQL Functions in PHP

    · bool mysql_close ([resource link_identifier])
    · resource mysql_connect ([string server [, string username [, string password [, bool new_link]]]])
    · string mysql_error ([resource link_identifier])
    · array mysql_fetch_array (resource result [, int result_type])
    · object mysql_fetch_field (resource result [, int field_offset])
    · int mysql_num_fields (resource result)
    · int mysql_num_rows (resource result)
    · resource mysql_query (string query [, resource link_identifier [, int result_mode]])
    · bool mysql_select_db (string database_name [, resource
    I have yet to add image and other functions to my list. Hope this helps some.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3
    scoutt
    Guest
    just download the manual in "chm" help file type and you can use it when ever you want. you can even search it.

    no need to print anything out.

    Predefined Variables in PHP
    Superglobals
    $GLOBALS
    $_SERVER
    $_GET
    $_POST
    $_REQUEST
    $_FILES
    $_COOKIE
    $_ENV
    $_SESSION

    you will use those the most, especailly in the newer version of php.

  4. #4
    Member
    Join Date
    Apr 2002
    Posts
    52
    handy list there.. hobo..

  5. #5
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by scoutt
    just download the manual in "chm" help file type and you can use it when ever you want. you can even search it.
    I print them out just in case I ever do get a job, I wanna be able to have something with me. But I guess I could put the help file on CD and bring it too, huh?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  6. #6
    scoutt
    Guest
    if you are relying on a piece of paper on your job, then you shouldn't have that job. know it in your head. once you get the job I garuantee you will be working on a computer so then you can have the manual on that computer.

    if the employeer sees you using a piece of paper on an interview he would think you don't know anything and have to rely on that paper. you won't get the job.

    just a thought...

  7. #7
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by scoutt
    if you are relying on a piece of paper on your job, then you shouldn't have that job. know it in your head. once you get the job I garuantee you will be working on a computer so then you can have the manual on that computer.

    if the employeer sees you using a piece of paper on an interview he would think you don't know anything and have to rely on that paper. you won't get the job.

    just a thought...
    Do you know the order of every parameter for every function in PHP? If so, then I hand you my balls. I personally don't find anything wrong with having a reminder sheet to use every once in awhile. Especially if you know so many languages. It's just impossible.

    So I take your thought and on it
    Last edited by The Hobo; May 25th, 2002 at 11:09 PM.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  8. #8
    scoutt
    Guest
    of course not and nobody expexts you too. but if you are at an interview then you should know your stuff. shouldn't have anything too difficult to where you don't know it. I look at the manual all the time, since it is on my computer. once you get the job you can look at it or your cheat sheet all the time.

    I was just saying why waste paper if the manual is help file an dalways with you, on your computer.

    in fact I just learned of a new function yesterday. some small pity thing. but it servered it purpose in the script.

  9. #9
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by scoutt
    of course not and nobody expexts you too. but if you are at an interview then you should know your stuff. shouldn't have anything too difficult to where you don't know it. I look at the manual all the time, since it is on my computer. once you get the job you can look at it or your cheat sheet all the time.

    I was just saying why waste paper if the manual is help file an dalways with you, on your computer.

    in fact I just learned of a new function yesterday. some small pity thing. but it servered it purpose in the script.
    I never meant using it on the interview. Of course, that would look horrible. And of course, I don't think they're going to say "Okay, before I have you start filling out the paper work, what are the parameters, in order, of the setcookie() function?" I could name the parameters but maybe not in the right order since I haven't used the function in awhile.

    I just mean you're sitting at your desk and you problem calls for use of str_replace, and you can't remember what the order is. Pull out the sheet and look real quick.

    But I do see how the help file would be a much better solution. I still haven't gotten around to downloading it yet
    My evil laugh has a squeak in it.

    kristopherwilson.com

  10. #10
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    Originally posted by The Hobo


    I never meant using it on the interview. Of course, that would look horrible. And of course, I don't think they're going to say "Okay, before I have you start filling out the paper work, what are the parameters, in order, of the setcookie() function?" I could name the parameters but maybe not in the right order since I haven't used the function in awhile.

    I just mean you're sitting at your desk and you problem calls for use of str_replace, and you can't remember what the order is. Pull out the sheet and look real quick.

    But I do see how the help file would be a much better solution. I still haven't gotten around to downloading it yet
    Most employer will buy you the IDE of your choice when you get there. I know all I have worked for asked me in the beginning "is there any software you need?". have then get you PHPEdit, it has intelisense so that when you type a function, it tells you what the parameters are and the order.
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  11. #11
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by blindlizard

    Most employer will buy you the IDE of your choice when you get there. I know all I have worked for asked me in the beginning "is there any software you need?". have then get you PHPEdit, it has intelisense so that when you type a function, it tells you what the parameters are and the order.
    Hmm...I might need to check that out.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  12. #12
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    It's free to, at least for personal use. It was made a French guy so once in a while you will get a message box in French, other that that it is rather good.
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  13. #13
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    I know though when I was starting out with VB and ASP, if I didn't have InterDev, I would have had a hard time at my first couple of jobs.
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  14. #14

    Thread Starter
    Fanatic Member Gimlin's Avatar
    Join Date
    Dec 2001
    Location
    Hell
    Posts
    734
    Thank you guys

  15. #15
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by blindlizard
    It's free to, at least for personal use. It was made a French guy so once in a while you will get a message box in French, other that that it is rather good.
    Does it have any syntax checking built in? Like the dreaded forgotten semicolon?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  16. #16
    scoutt
    Guest
    Zend also makes an ide like VB ide. it has a debugger and color coding. very cool and it has a trial vesrion.

    phpedit sucks as far as I'm concerned.

    there is another one that is called phpmole which is kind of cool, but a real ***** to setup. it runs out of the command box through ide and uses the php-gtk extensions. I have the links to ides for php on my links page at my site. check it out if you want.

  17. #17
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I just downloaded it and I think it sucks too.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  18. #18
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    It's all a matter of taste, and PHPedit also has a debugger.
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.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