custom function is not getting called

Posted by nectar on Stack Overflow See other posts from Stack Overflow or by nectar
Published on 2010-06-06T13:40:12Z Indexed on 2010/06/06 13:42 UTC
Read the original article Hit count: 117

Filed under:
|

here my code -

$child1 = create_childid()."01";
    $sqltree = "INSERT INTO tbltree (`userId`, `level`, `superId`, `rootId`, `childcount`) 
                            VALUES ('$child1', '1', '$newid', '$myroot', '0');";
    mysql_query($sqltree);
    echo $newid;
    update_level();


    $child2 = create_childid()."02";
    $sqltree = "INSERT INTO tbltree (`userId`, `level`, `superId`, `rootId`, `childcount`) 
                            VALUES ('$child2', '1', '$newid', '$myroot', '0');";
    mysql_query($sqltree);
    update_level();


    $child3 = create_childid()."03";
    $sqltree = "INSERT INTO tbltree (`userId`, `level`, `superId`, `rootId`, `childcount`) 
                            VALUES ('$child3', '1', '$newid', '$myroot', '0');";
    mysql_query($sqltree);
    update_level();


    $child4 = create_childid()."04";
    $sqltree = "INSERT INTO tbltree (`userId`, `level`, `superId`, `rootId`, `childcount`) 
                            VALUES ('$child4', '1', '$newid', '$myroot', '0');";
    mysql_query($sqltree);
    update_level();


    $child5 = create_childid()."05";
    $sqltree = "INSERT INTO tbltree (`userId`, `level`, `superId`, `rootId`, `childcount`) 
                            VALUES ('$child5', '1', '$newid', '$myroot', '0');";
    mysql_query($sqltree);
    update_level();

ERROR : update_level(); is executing only once why??

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql