Thread: MySQL - Quick Questions

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912

    MySQL - Quick Questions

    1) If someone has MySQL on their computer, and runs a client from another computer (the files (PHP in this case) are stored on the same computer as all the MySQL information), does the client need to specify a host to connect to?

    2) How do you add and retrieve binary file (i.e. blob) to/from a table? The book I''m learning from is very inconsistent in this area.

  2. #2
    Registered User FloatingPoint's Avatar
    Join Date
    Jun 2003
    Posts
    191
    1
    To connect to the server, you'll usually need to provide a MySQL user name when you invoke mysql and, most likely, a password. If the server runs on a machine other than the one where you log in, you'll also need to specify a hostname. Contact your administrator to find out what connection parameters you should use to connect (that is, what host, user name, and password to use). Once you know the proper parameters, you should be able to connect like this:

    shell> mysql -h host -u user -p
    Enter password: ********
    More info HERE

    2
    3.3.4 Retrieving Information from a Table

    The SELECT statement is used to pull information from a table. The general form of the statement is:

    SELECT what_to_select
    FROM which_table
    WHERE conditions_to_satisfy;
    what_to_select indicates what you want to see. This can be a list of columns, or * to indicate ``all columns.'' which_table indicates the table from which you want to retrieve data. The WHERE clause is optional. If it's present, conditions_to_satisfy specifies conditions that rows must satisfy to qualify for retrieval.
    More info HERE

    Hope this would give you some lead
    Come cast your shadow over me
    and I'll cast mine all over thee
    Take me away, into the shades
    where there is no light of day

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    The first one did, thanks. The second one? I know how to get regular data from a table but apprently the method for getting blobs (binary files) out is different. hanks for the info on the first one though. Anyone know about #2?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Two quick questions
    By Neolitic in forum C++ Programming
    Replies: 2
    Last Post: 03-27-2008, 10:54 AM
  2. Two quick questions about open file dialog boxes
    By PJYelton in forum Windows Programming
    Replies: 5
    Last Post: 04-05-2005, 08:49 AM
  3. Questions on basic Quick Sort
    By Weng in forum C++ Programming
    Replies: 4
    Last Post: 12-16-2003, 10:06 AM
  4. A quick question(s)
    By EvBladeRunnervE in forum C++ Programming
    Replies: 3
    Last Post: 02-17-2003, 09:39 PM
  5. A few quick questions...
    By cpp4ever in forum C++ Programming
    Replies: 3
    Last Post: 10-21-2001, 09:28 AM