Re: query problem in num_row

2005-02-08 Thread Ligaya Turmelle
Your not getting a valid result from your query. Add
if (!$result) { echo 'Bad query - message: ' . mysql_error();}
I think it will give you a syntax error on your query.  MySQL syntax for
the LIMIT clause is:
[quote]
The LIMIT clause can be used to constrain the number of rows returned by 
the SELECT statement. LIMIT takes one or two numeric arguments, which 
must be integer constants.

With two arguments, the first argument specifies the offset of the first 
row to return, and the second specifies the maximum number of rows to 
return. The offset of the initial row is 0 (not 1):

mysql> SELECT * FROM table LIMIT 5,10;  # Retrieve rows 6-15
[/quote]
Respectfully,
Ligaya Turmelle
Aji Andri wrote:
here a syntax
$query=&$conn->Execute("select * from itemlocation
where id limit 1 - 50");
$result=mysql_query($query);
$num_result=mysql_num_rows($result);
and error message are syntax error in
$num_result=mysql_num_rows($result); object unknown 
can someone please give a direction

all I want to do is comparing data in itemlocation
with a  value and if value in item location is smaller
then the value I make then it will appear in a message
Aji
		
__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 



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

query problem in num_row

2005-02-08 Thread Aji Andri
here a syntax

$query=&$conn->Execute("select * from itemlocation
where id limit 1 - 50");
$result=mysql_query($query);
$num_result=mysql_num_rows($result);

and error message are syntax error in
$num_result=mysql_num_rows($result); object unknown 
can someone please give a direction

all I want to do is comparing data in itemlocation
with a  value and if value in item location is smaller
then the value I make then it will appear in a message

Aji



__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


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