and please, next time paste the error or tell us at least,
if it is a php error or a mysql error and the line on which it occured
and mark that line in your sample code, so someone can look at it ,
understand it and help you.

Regards Michael

"Michael Virnstein" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> $this usually is a self-reference inside a class.
> Use it with care!
> try to "echo $sql;", perhaps this tells you more.
>
> Regards Michael
>
> "James Opere" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> FC788AB9771FD6118E6F0002A5AD7B8F7268AB@ICRAFNTTRAIN">news:FC788AB9771FD6118E6F0002A5AD7B8F7268AB@ICRAFNTTRAIN...
> > Hi All,
> >  I'm trying to pass variables from one form to the other.I have a
problem
> > when i want to do the the following:
> > 1.COUNT($variable)
> > 2.DISTINCT($variable)
> > .............
> > I realise i can not use the brackets in my query and the variable be
> > recognised.When i add COUNT without the brackets i still get an error.
> > Example.
> > test.html
> > <form action="me.php" method="post">
> > <input type="text" name="this">
> >  ..............
> > This is sent to :
> >
> > me.php
> > <?php
> > $db=mysql_connect('localhost','','');
> > mysql_select_db($database,$db);
> > $sql="select COUNT($this) from $table group by  $this";
> > ................
> > ?>
> >  This  gives an error.
> > Please help.
> >
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to