For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > July 2007 > Re: [PHP-DB] Re: record pointer









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] Re: record pointer
Dan Shirah

2007-07-05, 6:58 pm

Okay, in your first post you said you were selecting by category, now you're
saying you are selecting by ID and want all corresponding records that have
the same category as the selected ID.

Which way are you trying to do this??


On 7/5/07, elk dolk <elkdolk@yahoo.com> wrote:
>
> O.K. the id column is primary key and it is auto_incerment .I think my
> explanation was not clear enough :
>
> this is my query : SELECT * FROM table WHERE ID=$ID
> this will find the record with the specified ID and I will be able to see
> it, now I want to be able to scroll up and down to all the records that
> belong to the same cat(egory)!
>
>
>
> Frank Flynn <frank@declan.com> wrote:
> This is standard SQL:
>
> SELECT id, name ,cat FROM catTable WHERE cat = 'zzz';
>
>
> This would return something like
> ----------------------------
> id name cat
> ----------------------------
> 1 fred zzz
> 5 fefe zzz
> 18 Mr. Puddles zzz
> 27 Moris zzz
>
>
> and so on
>
>
> Your column 'id' is the pointer you're looking for. You should define it
> as 'PRIMARY KEY' and perhaps AUTO_INCREMENT (this means MySQL will
> automatically assign a value to it).
>
>
>
>
>
>
>
>
>
> Hi all,
>
>
> My DB has the following columns: id, name ,cat. I want to select a cat
> i.e. cat=zzz when the query is finished I should see a specific record
> within this cat which is defined by id, like id=yyy
> Any idea how to do this? Is there a function or something like record
> pointer in MySQL ?
>
>
> cheers
>
>
>
>
>
>
> ---------------------------------
> Get your own web address.
> Have a HUGE year through Yahoo! Small Business.


Girlsnicknames

2007-07-15, 3:30 pm

Catherine Z. Jones and Christina Applegate Slobbering Each Other!
http://www.reyrewh.com/WatchTube?vid=148803


extreme funny video extremely funny video funny junk video crazy funny video clip free sexy funny video clip
http://635-funny-video.info/funny-dog-video.html http://635-funny-video.info/clip-fu...emon-video.html http://635-funny-video.info/funny-animal-video.html http://635-funny-video.info/funny-home-video.html http://635-funny-video.info/free-fu...-your-site.html
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com