The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi,
I was wonerding, is there a way to call one row in a column? Lets say I have table called "test" with 3 columns (id, title, content). Lets also say that there are 10 rows. What if I want to call row number 5 in the id column and at the same time row number 8 in the title column. I was hoping for something like this: PHP Code:
Thanks in advance Niklas |
#2
|
||||
|
||||
![]()
mysql_fetch_assoc() returns an associative array, so it would actually be:
PHP Code:
|
#3
|
|||
|
|||
![]()
well i never said i used the right fetch method....i have no idea what to use actually. in your example, all rows would be called. my question is: is there a way to separate the rows? I want to be able to call row number 4 and then row number 6, not the other ones? is there a way to achieve this?
Thanks for helping....again ahaha |
#4
|
||||
|
||||
![]()
just 4 and 6? or 2, 4, 6, 8, etc?
Anyway, something like this could work for your query [sql]SELECT * FROM `test` WHERE `id` IN (2,4)[/sql]Note this is id 2 and 4, not necessarily rows 2 and 4. You can narrow the results in MySQL or PHP... here is a PHP example to show every second row... PHP Code:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|