Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: jgd12345
  • Order by date
  1. jgd12345

    Displaying records correctly from array

    Ooh noo. It has it good points but generally aint too keen on it.
  2. jgd12345

    Displaying records correctly from array

    Hi the above was exactly what I was after then I ran into another problem. I wish to limit the initial query to only display 20 bands (eg rows 21-40 or 41-60). Since the query contains multiple rows for each band and this is not a consistent number for each band this can not be done in a...
  3. jgd12345

    Query Support (Reduce Queries)

    Hi with a bit of my magic I come up with: $bandids = array(); $query = mysql_query("SELECT * FROM bands LIMIT 0, 20"); while($band = mysql_fetch_array($query)) { $bandids[] = $band['id']; } $bandids = implode(', ', $bandids); $count = array(); $query = mysql_query("SELECT bid, filetype...
  4. jgd12345

    Query Support (Reduce Queries)

    Hi the second query idea sounds good but if you do the second query using the 20 retrieved id's then surely the only way to do this is by putting it inside the loop which goes through the rows of the band query therefore adding an extra 20 querys.
  5. jgd12345

    Query Support (Reduce Queries)

    Hi cheers worked a treat. Now I've run into a problem with the initial sql query. When I use limit to display the first 20 bands it displays the first 20 rows. The trouble is that there is an inconsistent number of rows for each bands (depending on the filetype of the records in the tabs...
  6. jgd12345

    Query Support (Reduce Queries)

    Ah right cheers for your help getting me to this stage.
  7. jgd12345

    Displaying records correctly from array

    Hi, I need to display the number of guitar tabs, drum tabs, bass tabs, lyrics for each band. I understand that query below gets the information but I don't know how to display it for each band. Here's the code so you can see what I'm on about: $query = mysql_query(" SELECT b.id...
  8. jgd12345

    Query Support (Reduce Queries)

    Hi no sorry didn't explain that too great. I meant I need it to display the number of guitar tabs, drum tabs, bass tabs, lyrics for each band. I understand that query gets the information but I don't know how to display it for each band.
  9. jgd12345

    Query Support (Reduce Queries)

    Hi for example I did the following: $query = mysql_query(" SELECT b.id , t.filetype , count(t.id) AS thecount FROM bands b tabs t WHERE b.id=t.bid GROUP BY b.id , t.filetype LIMIT 0, 20 "); while($band = $db->fetch_array($query)) { echo "band id: $band[id] | count...
  10. jgd12345

    Query Support (Reduce Queries)

    Hi thanks, how would I use that to display the count when the filetype='Lyrics' and filetype='Guitar Tab' for that particular query.
  11. jgd12345

    Query Support (Reduce Queries)

    Hi, Basically I have a loop which does the following: $query = mysql_query("SELECT * FROM bands"); while($band = mysql_fetch_array($query)) { $tabs = tablinks($band['id']); echo $tabs; } As it goes through the loop the tablinks function is done which contains 5 additional queries...
  12. jgd12345

    Delete Single Record From Table

    Ah k looks like the long way. I just got rid of the primary key field because I thought I didn't need it then I realized how would I deal with deleting them, if a user has more than one of the same item. Damn me. Cheers for your help.
  13. jgd12345

    Delete Single Record From Table

    Hi, I know this sounds easy from the topic but what I'm wondering is how to delete just one record even if the criteria matches more than once. For example say you have the table member_items: uid | iid 1 | 2 1 | 2 Where uid is the members uid and iid is the items id. I want to be able...
  14. jgd12345

    Mod Rewrite: Redirecting PHP Pages to seperate directories

    Hi this is sorted now. Needed to change ^threads to ^forum/threads. Silly me.
  15. jgd12345

    Mod Rewrite: Redirecting PHP Pages to seperate directories

    Hi I wish to access my files at http://www.domain.ext/forum/threads/165 instead of http://www.domain.ext/forum/viewthread.php?tid=165 So I created a .htaccess file (and put it in the forum directory) with the following content: RewriteEngine on RewriteRule ^forums/([0-9]+)/([0-9]+)...
  16. jgd12345

    Display contents of select box

    Hi worked a treat one prob though it goes onto a new line and the text after that aswell. I've uploaded the file so you can see http://www.flixon.com/shop/forum/test.htm I strictly don't want todo this and be greatful if you could show me how to resolve it. Thanks
  17. jgd12345

    Display contents of select box

    Hi, I've got a problem I expect you guys'll solve in 5 seconds but has been troubling all day. Right here it is. I've got the following code: <script language="JavaScript"> function updateCurrency() { var totamount = document.newItem.payment.value writeLayer("totalAmount", totamount); }...
  18. jgd12345

    Unique Random Number Problem

    Cheers worked a treat.
  19. jgd12345

    Unique Random Number Problem

    Hi I have the following script which should generate 3 unique random numbers and store them in the corresponding text boxes when run but it returns an error. <script> function addLuckyDip(lineNumber) { var randomnumber[0] = Math.floor(Math.random() * maxValue) + 1; var randomnumber[1] =...
  20. jgd12345

    Problem with unix timestamps deciding whether week has passed

    If anyone's interested this is how I'm going todo it. Using the getdate function you recommended I will store the current: $set['dom'] - day of month $set['month'] - month $set['year'] - year in the settings each time I draw is made. I also have the following in the settings: $set['hour'] -...

Part and Inventory Search

Back
Top