473,387 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

$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?

Jul 23 '05 #1
2 1155
st***********@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?
Jul 23 '05 #2
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

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: lawrence | last post by:
I've this function, which is the method of a class. I'm posting the constructor of the class down below. For some reason, when I fill out a form and hit submit, I'm not getting any values. Can...
4
by: jabailo | last post by:
This is driving me crazy. I finally got the Remoting sample chat application working almost. When I run the chat client in VS.NET it goes into an endless loop -- that's because I assume that...
5
by: Andrew Poulos | last post by:
If I'm searching for an occurance of a value in a multi-dimensional array how can I get it's index returned as an array, if found? For example, if: foo = new Array(); foo = , 5, , 9, 10]; ...
15
by: Greenhorn | last post by:
Hi, when a function doesn't specify a return type ,value what value is returned. In the below programme, the function sample()is returning the value passed to 'k'. sample(int); main() { int...
2
by: melanieab | last post by:
Hi, Just checking to see if there's anything I can possibly do to allow for the recognition of the Tab key being pressed. On the KeyDown event I've tried: if (e.KeyCode == Keys.Tab), if...
87
by: John Rivers | last post by:
Hello everybody, I just wondered if anybody else has noticed this? It takes around 6 seconds to start debugging a very simple ASPX page with VS.NET whereas VB6 takes under 0.5 seconds, even...
10
by: Martin Jørgensen | last post by:
Hi, I got this piece of code, but I won't compile: #include <iostream> using namespace std; //////////////////////////////////////////////////////////////// struct link ...
1
by: Bill | last post by:
These two server variables should ALWAYS return the domain name of the host: - Request.ServerVariables("SERVER_NAME") - Request.ServerVariables("HTTP_HOST") Under what circumstances can those...
3
by: neolempires2 | last post by:
hi..i'm new in sql progaming, i try to make make a query that in table field "match" return to "1" if no member record in another table and return to "0" if there is any record member : ex...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.