[PHP-DB] input statement in php

2010-07-26 Thread Bavithra R
hi friends..


Is there any equivalent statement in php  for "scanf" or "cin" in c or c++?
That is without using html and creating forms.


Thanks in advance
regards
--Bavithra.R


Re: [PHP-DB] Need Help in error msg

2010-06-14 Thread Bavithra R
hi..

Try to change the root password by System->administration->users and groups.
Unlock the key and double click the root.Change the root password and try
downloading again.I hope this works.

--Bavithra


Re: [PHP-DB]how to handle exception in php

2010-05-08 Thread Bavithra R
hi friends...

Thanks for your suggestions..but i could not get the exact rank list
properly..
My code is as below..

$sql2="SELECT * FROM rank";
$result=mysql_query($sql2,$con);
$num=mysql_num_rows($result);
for($i=0;$i<$num;$i++)
{
$f1=mysql_result($result,$i,"regno");
$d6=mysql_result($result,$i,"total");
$d7=mysql_result($result,$i+1,"total");
$d8=mysql_result($result,$i,"rank");
if($d6==$d7)
{
$sql8="UPDATE $_POST[test] set rank='$i'+1 where total='$d6'";
mysql_query($sql8,$con);
}
else if($d6!=$d7)
{
$sql1="UPDATE $_POST[test] SET rank='$i'+1 WHERE regno='$f1'";
mysql_query($sql1,$con);
}

But if i use while loop as you people said..No such list is obtained.
Please check and tell if i could do any changes in the above code..

Also if any two students has secured the same total they has to be given the
same rank..Till now it generates the rank but in this order...1 2 3 4 7 7
7..As the last 3  students has the got same total..
any suggestion


regards
--Bavithra


Re: [PHP-DB] how to upgrade php in linux

2010-05-04 Thread Bavithra R
>  i have downloaded the tar file from php.net but dont know how to complile
>the same for the linux.
>
> Hi Chaitanya
>
>
> As you have downloaded the tar file you need to extract it.
>
   Try this
*Extraction:  *tar -jxvf php-5.3.2.tar.bz2
where php-5.3.2.tar.bz2 is the filename you downloaded.
Check to the file extension whether it is .bz2
If not use
  tar --help
which provides the extraction options.
Then you need to configure it.For that
*  configuration: *   ./configure --prefix==/usr/local/php
I hope this works.Try and see



regards
--Bavithra


[PHP-DB]how to handle exception in php

2010-05-01 Thread Bavithra R
hi friends

I am doing a simple student mark details project.
for calculating rank I need to compare the total marks one by one.
To do so i use *for loop.* so atlast while reaching the end of the table it
shows the following warning.
*
Warning*: mysql_result()
[function.mysql-result]:
Unable to jump to row 18 on MySQL result index on line *50*

It is because it has no next value to compare.How to use try..catch
exception handling in this.?Or any other suggestion.
Can anybody help me

--Bavithra