Jump to content

dj-kenpo

Members
  • Posts

    155
  • Joined

  • Last visited

    Never

Everything posted by dj-kenpo

  1. Hi all, you know the apache built in authenticate boxes? username+password. is it possible to run a php script that can log into that? do I send the username/pass as a post? is this possible? I've searched everywhere and only found info on making one. I don't want to make one, I want to log into one via a php script. reason: dreamhost uses that for the login for the stats page, I want to read the data from the page in a php script, but first I need to log in.... thanks for any help
  2. I'm just not seeing how that query will give me 10 blog entires and then 20 images. won't it just give me ONE image per blog entry? or does it return images.image as an array containing the 5 images?
  3. what I'm trying to ask (and I appologize if I'm not getting this accross...) is how to get this: table blog entries id | title | entry 2 | entry 01 | body text 3 | entry 02 | body text table blog images rel_id | image 2 | aa.jpg 2 | bb.jpg 2 | cc.jpg 3 | dd.jpg what I'd like is one query that grabs all that data into the result: entry o1 body text - aa.jpg - bb.jpg - cc.jpg entry 02 body text - dd.jpg ------------- rather than calling query blog entries while result { get id print blog title print blog entry ----query for images with rel id = blog id {print images} } it's just alot of nested queries once you add comments + more entries
  4. Thanks for the reply, but unless I'm mistaken that won't work. "SELECT food.Meal, family.Position FROM family, food WHERE food.Position = family.Position" won't help me if there's 40 images attached, or am I wrong? (I accept that I very well may be) it looks like it will only get the last image. or put in other terms, the last element in the nested query.
  5. I'm still learning so excuse me if this is a silly question. I'm wondering if there is an alternative, IE faster way of doing or avoiding all together nested sql queries. example: my blog script uses a while loop and fetches 10 entries. on each of those 10 entries it then does ANOTHER sql query + while loop for any images attached in the relational database (ie one blog entry might have 1 or 9 images attached) that's now 11 queries minimum, not including comment number on each entry, now we're up to 21 queries per page load. there's got to be a more efficient way
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.