please help .........very urgent

2005-09-07 Thread Kane Wilson


hi , 

I wanted to check the following condition and if it is
success i wanted to display a massage.I tried as
follows. but no luck. nothing displayed.

$dbQuery = results;
$result = mysql_query($dbQuery) or die(Couldn't get
file list);

if (!isset($result))
   {echo NULL;}


//if (mysql_result($result == 0))(

//echo sorry;

?


please , tell me how can i do this ?

Thanx
Kane.




__
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: please help .........very urgent

2005-09-07 Thread Jigal van Hemert

Kane Wilson wrote:

I wanted to check the following condition and if it is
success i wanted to display a massage.I tried as
follows. but no luck. nothing displayed.

$dbQuery = results;
$result = mysql_query($dbQuery) or die(Couldn't get
file list);

if (!isset($result))
   {echo NULL;}


//if (mysql_result($result == 0))(

//echo sorry;

?
Although this is something for a PHP mailing list of forum, I'll try to 
give you some pointers.


I assume that you first used mysql_connect() to connect to the MySQL db.

mysql_query() returns FALSE if the query failed for some reason. In that 
case you can use mysql_error() to retrieve the error message.

$result = mysql_query($dbQuery);
if (!$result) die('Query failed: ' . mysql_error());

Checking isset() is useless, since $result is always set (either with 
false, true or the result resource of the query).


http://www.php.net/manual/en/ref.mysql.php contains an example which 
shows all the steps you need to set up a connection and run a query.


Regards, Jigal.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: please help .........very urgent

2005-09-07 Thread Gleb Paharenko
Hello.



 $dbQuery = results;



Have you forgotten to put '$' before the 'results'? Do you

have display_errors = On in your php.ini?





Kane Wilson [EMAIL PROTECTED] wrote:

 

 

 hi , 

 

 I wanted to check the following condition and if it is

 success i wanted to display a massage.I tried as

 follows. but no luck. nothing displayed.

 

 $dbQuery = results;

 $result = mysql_query($dbQuery) or die(Couldn't get

 file list);

 

 if (!isset($result))

   {echo NULL;}

 

 

 //if (mysql_result($result == 0))(

 

 //echo sorry;

 

 ?

 

 

 please , tell me how can i do this ?

 

 Thanx

 Kane.

 

 





 __

 Click here to donate to the Hurricane Katrina relief effort.

 http://store.yahoo.com/redcross-donate3/

 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   ___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: please help .........very urgent

2005-09-07 Thread Edwin Cruz
Hi!!

$dbQuery = select * from table where 1 ;
$result = mysql_query($dbQuery) or die(Error trying to execute the query:
.mysql_error());
If(mysql_num_rows($result)1){ //also: ==0 works
echo NULL;

-Original Message-
From: Kane Wilson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 07, 2005 1:40 AM
To: mysql
Subject: please help .very urgent



hi , 

I wanted to check the following condition and if it is success i wanted to
display a massage.I tried as follows. but no luck. nothing displayed.

$dbQuery = results;
$result = mysql_query($dbQuery) or die(Couldn't get file list);

if (!isset($result))
   {echo NULL;}


//if (mysql_result($result == 0))(

//echo sorry;

?


please , tell me how can i do this ?

Thanx
Kane.




__
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]