Re: HElp!!!!!!!!
| From: | Nicolas Windpassinger - Sun Microsystems | Date: | Fri, 27 Oct 2000 07:27:36 +0000 |
| Subject: | Re: HElp!!!!!!!! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-22285@lists.php.net to get a copy of this message | ||
Dhaval,
Just a quick comment,
a think that i always do when i am messing around with MySQL is to test
them via mysql directly without using php.
When you know that your querry is ok, then you can play with php.
i Think the $try = mysql_db_query($search); is where your error is, because
it is never null!! that is why i suppose you have always Success......
since you did not give the errors.......the most obvious is that. What i
suggest is type in echo $try; and then do a $toto=mysql_fetch_array($try),
an then
echo $toto["Host"]; etc.....have fun,
nicolas
> Hey!
>
> Do u guyz think there is any error in this code..??
>
> I am adding a new user with some priviliges..It shows
> some error for me...
>
> <?php
>
> mysql_connect("localhost","root","dhaval");
> $select = mysql_select_db("mysql");
>
> $search = "INSERT INTO user
> (Host,Username,Password,Select_priv,Insert_priv,Update_priv,Delete_priv)
> VALUES
>
> ('%','jay','password('password')','Y','Y','Y','Y')";
>
> $try = mysql_db_query($search);
>
> if($try)
> {
> echo "Success";
> }
> else
> {
> echo mysql_error();
> }
>
> ?>
>
> Please help me!1...Ugrgent help needed...
>
> Thanx a lot!!
>
> Cheers!~
> Dhaval Desai
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Messenger - Talk while you surf! It's FREE.
> http://im.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net