Results 1 to 4 of 4

Thread: Help using "CONCAT" ?
      
   

  1. #1
    Join Date
    Nov 2006
    Location
    Centurion, South Africa
    Posts
    586

    Question Help using "CONCAT" ?

    Hi folks,

    I have a table with data surname and name and currently some info populates a field in page www.gnjgf.co.za/rankings.php

    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
    Location
    Cincinnati, Ohio
    Posts
    2,116

    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
    Location
    Italy
    Posts
    12,080

    Default Re: Help using "CONCAT" ?

    Change the code in the drop down Inside Tag to :


    ><?php
    $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:

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





    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com 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
    Location
    Centurion, South Africa
    Posts
    586

    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
  •