Welcome to dbFreaks.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Won't return anything when there is only one matching row.

 
   Database Help (Home) -> mySQL RSS
Related Topics:
accessing the return value of called procedure - this is one way of creating a stored procedure in mysql: CREATE PROCEDURE (IN value1, OUT value2) BEGIN <font SELECT ... INTO value2 FROM END// and if called from another i can access the..

Best way to issue hundreds of inserts/updates??? - Using mysql 4.0.23- What is the best way to execute several (hundreds of) inserts and updates? Rather than issuing tons of inserts and updates, can I send the strings to a text file and then have mysql do them all?? IE : query.txt insert..

MySQL freezes, brings XP machine to a grinding halt - I've been using MySQL for a while for fairly light database on my XP machine. I am just starting a new project and have some big problems with MySQL today both on my office machine and at home where running a

login as user 'root' but do not have root privlages and my.. - Hi gang: I'm a problem with MySQL -- I updated MySQL from version 4.1.0 to 4.1.10 and now when I login as root it doesn't show all the databases I should have access to, nor it doesn't recognize me being logged in as root (via..

FLUSH TABLES hangs if table is locked - Using FLUSH TABLES via the C query API hangs if the table is locked already. That is to say, nothing prevents me from running a LOCK TABLES twice; it won't tell me already locked, don't try to run a Anyone know how to find..
Next:  Full Table Scans  
Author Message
steve.burgess

External


Since: Feb 08, 2005
Posts: 6



(Msg. 1) Posted: Tue Feb 08, 2005 4:32 am
Post subject: Won't return anything when there is only one matching row.
Archived from groups: mailing>database>mysql (more info?)

$sql = 'SELECT `PageTitle` ';
$sql .= 'FROM `Pages` ';
$sql .= 'WHERE `PageID` = 1 LIMIT 0, 30';



I have run this query in MySQL control panel and it works perfectly.
When I try to do it via PHP I get no results.

If I select all rows (i.e I don't specify a "WHERE") I get one fewer
rows returned than there actually are.

Any ideas?

 >> Stay informed about: Won't return anything when there is only one matching row. 
Back to top
Login to vote
steve.burgess

External


Since: Feb 08, 2005
Posts: 6



(Msg. 2) Posted: Tue Feb 08, 2005 10:38 am
Post subject: Re: Won't return anything when there is only one matching ro [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks - I seem to have solved this one (but not sure how).

But in answer to your question it was returning 0 rows when there was
one - 2 when there was 3. There would never be over 30 rows.

Steve

 >> Stay informed about: Won't return anything when there is only one matching row. 
Back to top
Login to vote
Aggro

External


Since: Aug 28, 2003
Posts: 8



(Msg. 3) Posted: Tue Feb 08, 2005 10:40 am
Post subject: Re: Won't return anything when there is only one matching ro [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

steve.burgess.TakeThisOut@boston-spa.org.uk wrote:

 > I have run this query in MySQL control panel and it works perfectly.
 > When I try to do it via PHP I get no results.

Perhaps there is something wrong with the php code you are using? Hard
to say without seeing it.

 > If I select all rows (i.e I don't specify a "WHERE") I get one fewer
 > rows returned than there actually are.

If you got limit 0, 30, it will return only 30 rows even if there are
more rows. So how many is it returning?<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Won't return anything when there is only one matching row. 
Back to top
Login to vote
Display posts from previous:   
   Database Help (Home) -> mySQL All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]