Paging

Paging

am 12.05.2009 03:07:00 von Joey Hendricks

------=_NextPart_000_009B_01C9D274.0B73FD80
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi everybody, I have a paging question. I have a page where you can view =
a persons 'profile'. And I have a list taken from the db of there books. =
I can get all the books on one page but I can't figure out the WHERE =
from the get. This is what I tried but it didn't work.
$query =3D "SELECT COUNT(*) AS numrows FROM tabs WHERE =
user_name=3D'".$_GET ['user_name']."';
$data =3D mysqli_query($dbc, $query) or die('Error, query failed');
$row =3D mysqli_fetch_array($data);
$numrows =3D $row['numrows'];

When I do this it shows a second page but when I click on the next page =
It goes to my profile or the user who is logged in, not the users =
profile I was looking at on page 1. Thanks every one for all your help!!
------=_NextPart_000_009B_01C9D274.0B73FD80--

Re: Paging

am 13.05.2009 15:11:41 von Phpster

--001636c5a440c8f6380469caf351
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On Mon, May 11, 2009 at 9:07 PM, Joey Hendricks
wrote:

> Hi everybody, I have a paging question. I have a page where you can view a
> persons 'profile'. And I have a list taken from the db of there books. I can
> get all the books on one page but I can't figure out the WHERE from the get.
> This is what I tried but it didn't work.
> $query = "SELECT COUNT(*) AS numrows FROM tabs WHERE user_name='".$_GET
> ['user_name']."';
> $data = mysqli_query($dbc, $query) or die('Error, query failed');
> $row = mysqli_fetch_array($data);
> $numrows = $row['numrows'];
>
> When I do this it shows a second page but when I click on the next page It
> goes to my profile or the user who is logged in, not the users profile I was
> looking at on page 1. Thanks every one for all your help!!



Can you post the code snippets for the sections that matter?

Also, have a look at the variables you are calling, maybe one is overwriting
the other

--

Bastien

Cat, the other other white meat

--001636c5a440c8f6380469caf351--