Results 1 to 4 of 4

Thread: Help using "CONCAT" ?

  1. #1
    Join Date
    Nov 2006
    Centurion, South Africa

    Question Help using "CONCAT" ?

    Hi folks,

    I have a table with data surname and name and currently some info populates a field in page

    I would like to know how to make a change that the field shows the surname, name of the player and not just the surnames as is currently veiwed.

    Your help would be appreciated

  2. #2
    Join Date
    Sep 2005
    Cincinnati, Ohio

    Default Re: Help using "CONCAT" ?

    Assuming both "surname" and "name" as different columns you can just echo both right next to eachother on your webpage that displays it.

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

  3. #3
    Join Date
    Oct 2005

    Default Re: Help using "CONCAT" ?

    Change the code in the drop down Inside Tag to :

    $query = mysql_query($query1);
    while($row = mysql_fetch_assoc($query))
    echo '<option value="'.$row['surname'].' '.$row['name'].'">'.$row['surname'].' '.$row['name'].'</option>';

    You will also need to change the "before Tag" code in:

    $connect = mysql_connect("localhost", "?????_?????", "?????") or
    die ("Hey loser, check your server connection.");
    $query1="select * from _Form_Nr_2 ORDER BY `surname` ASC, `name` ASC";

    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

  4. #4
    Join Date
    Nov 2006
    Centurion, South Africa

    Thumbs up Re: Help using "CONCAT" ?

    Hi George,

    Thanks it works like a dream.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


Posting Permissions

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