![]() |
Repeating the same query
I am doing a query where the choices are title=$extra1 or title=$extra2 or title=$extra3 (up to 6 extras)
I am getting the same result for all, and I ended up doing the below 6 times. Surely there must be another way to do this to avoid the 6 queries? PHP Code:
|
PHP Code:
|
Can't you do a:
Quote:
|
Quote:
This is a non Vb script where I cannot do a normal eval for a templatebit. when I do: PHP Code:
$extra1 only the first one is returned. The others have no results. Quote:
|
I dont seem to understand your problem :)
Please post a scheme of your Table with example Data, the values for extra1, extra2, etc. and what you would like to have returned. But I think your problem does have nothing to do with the query: PHP Code:
|
OK, here is what I am doing:
When I input the data in that page I have $desc which I am using to parse Geek autolink to lyrics. I have 6 extra fields that I could use. I am using them to query a database of MP3s. I put the exact title in the various extra fields. Then I do a query in the php. If the soundtracks title matches one of the extras, then I need to get the info for each one of the extras (I have embeded a player in the page and when you click on the link at the bottom of the page, it plays the selected clip). My method works, but I have to do the same query six times. |
The linked page is in french and I understand nothing :)
Please, just post your table scheme, example data, the extraX values and which rows you want to have selected for those. |
Oh well, sorry for the French.
I am no guru. What you saw is from painfully put together hours of trial and error spaghetti codes. I don't even know what you mean by schema. |
Quote:
|
This is the scheme of Table datastore:
Code:
CREATE TABLE `datastore` ( Code:
INSERT INTO `datastore` VALUES ('cron', '1122540900'); |
All times are GMT. The time now is 01:54 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|