A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: PHP not give back duplicate columns

Threaded View

  1. #1

    PHP not give back duplicate columns

    Hello,

    I'm building a game in flash with php and mysql.
    By loadvars I send an array to a php-script.
    The php-script should give me back the name in a column as the array is.
    example : 1,2,1,2,3 should give me back one,two,one,two,three

    But it gives me back: one, two, three (and not the extra one and two).

    This is my script:

    PHP Code:
    <?php
    include 'DB.php';

    $taal $_POST['taal'];
    $getallen $_POST['getallen']; //example: 1,2,1,2,3';

    $conn = @mysql_connect($server,$user,$pass);
    $database = @mysql_select_db($database,$conn);


    $array = array($getallen);
    $ids implode(","$array);

    echo (
    $getallen); //gives me back 1,2,1,2,3 (thats ok)

    $query = @mysql_query("SELECT getallen FROM test WHERE woordgetallen IN(".$ids.") AND `lang_id` = '1' ORDER BY NULL");


    $counter 0;

    print(
    "&getallennaam=");

    while(
    $ourData = @mysql_fetch_array($query)){
        
    $name $ourData["flashgetallen"];
        
    $counter++;
    print(
    "$name,"); //gives me back just one, two, three instead of one,two,one,two,three
    }
    print(
    "&geladen=1");
    ?>
    Last edited by asjbak; 08-23-2010 at 11:57 AM.

Tags for this Thread

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

HTML5 Development Center