Jump to content

sakibd2k

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Posts posted by sakibd2k

  1. Thanks F1Fan

    one last request  is it than possible

     

    when i put condition under select query put it in variable  which will be choosed by user

     

    i mean when i am using this query in parantheses  i want here instead of id<=20500  id<=$var

     

    select  id,credit from cc_cdr where id<=20500 AND id>=10501 AND credit<5 ORDER BY id ASC

     

    Where $var will be given by input in html file and php will process

     

    this way at least thing will come easier.

     

    Thanks again

  2. Thank you F1fan. I knew i was missing the array or something like that but do not know how does it solve.

     

    I am very happy at least this one solved.

     

    But the out put showing all the thing like following

     

    Array ( [0] => Array ( [0] => 10505 [id] => 10505 [1] => 0.1016 [credit] => 0.1016 [2] => 2259217297 [username] => 2259217297 ) [1] => Array ( [0] => 10506 [id] => 10506 [1] => 0.0260 [credit] => 0.0260 [2] => 9273294177 [username] => 9273294177 ) [2] => Array ( [0] => 10507 [id] => 10507 [1] => 0.3040 [credit] => 0.3040 [2] => 6944787983 [username] => 6944787983 ) [3] .................................................

     

    I want to show them like following

     

    id        credit          username

     

    10505  0.1016    2259217297

    ........................................

     

    to view This manner  what i need to do?

     

  3. Hello,

     

    I am trying to query and show it by fetching all the row  but actually only one row shows up

    not all the rows by defined condition.

     

    The code is

     

    <?php

    $db=pg_connect("host=localhost dbname=xxxx  user=xxxx  password=xxxx ");

    ..........................................................

     

     

    $result=pg_query($db,"select  id,credit from cc_cdr where id<=20500 AND id>=10501 AND credit<5 ORDER BY id ASC");

     

    $row=pg_fetch_array($result);

    echo $row["id"];

    echo  $row["credit"];

     

    ?>

     

    i can see only one , the first row

    if i change pg_fetch_all($result)

     

    nothing show up

     

    what will  i do in this case?

     

     

  4.  

    Hi all,

    I am very new in OOP in PHP.

    Here i want to do

    There is two class define in two seperate php pages.What i want to do i want to use one property under one object  to another page(which is another different class). To do that

     

    Class Rate{

      var $ discharge = 0 //(i initialize it);

    var $ rateinitial = 0;

    --------------------------------

    there is lot of function in the middle which is not required.

    -----------------------------

     

      function rate_engine(&--,--,--){

    $kkkkkkk=round(abs($this->rat_obj[$m][12]));

     

    //i did the following thing over here property of currnet object get this value at this time and use it to  //another page another object

     

    $this->discharge=$kkkkkkk;

     

      }

    }

    and now there is another page another class

     

    class B2A{

     

    function(---------------){

     

    $m= $m + $rate->discharge;(my point is over here adding the property value of another object in another page)

    }

     

    }

     

    but if i do this, my script does not run.

    without  thinking of my code i wrote can any one tell what should be done for this kind of thing?

    help is appreciated.

    Mushfiq.

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.