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: thepixel
  • Order by date
  1. thepixel

    Getting totals from 2 tables based on 1 table

    Wow. This is incredible. I actually just sent an email to my boss to order your book. (... and just got a reply back to go ahead and order it) So the other thing is, After reviewing the table structure (rather than the old code), there's actually 4 levels to this whole relationship schema...
  2. thepixel

    Getting totals from 2 tables based on 1 table

    I'm trying to lookup some totals by state in these 3 tables. We have a league table, which contains the state column, then we have a team table which has a reference back to league, then we have a member table which references back to the team table. I'm trying to figure out how to get totals on...
  3. thepixel

    Can't wrap my brain around Viral (forwards) Statistics

    I'm trying to pull statistics from 2 tables. Here's what happens: An affiliate sends out emails to 10 (or so) people. One of those people sends out an email to 5 people. One of those 5 sends out a video to 2 people. I need to track the total resulted from the original 10 sent out, which should...
  4. thepixel

    Need help finding problem with query.

    Ha. I just came back to post a response because I was getting 2 results instead of just one. Thanks again.
  5. thepixel

    Need help finding problem with query.

    Thanks again Rudy!
  6. thepixel

    Need help finding problem with query.

    Ok. I'm not exaclty sure if I'm doing this right. I want to select [these fields] from affiliate and join `user` (there should always be a corresponding record on user and it should not return anything if there isn't), then I want to join image (where there may or may not be an image, but it...
  7. thepixel

    Need help finding problem with query.

    Thanks a bunch rudy! Thanks also for explaining what's going on. it makes a lot more sense now, and I have learned something new as a result of it! I appreciate it!
  8. thepixel

    Need help finding problem with query.

    the strange thing is this was working on the testing server. and now that i've moved it to the live server with the exact same table schema/data, it throws this error. I've checked to make sure I'm using the correct Database. Select statements are working elsewhere on the site. Not sure what's...
  9. thepixel

    Need help finding problem with query.

    My query returns with this error: Unknown column 'u.user_id' in 'on clause' Here's the query: SELECT u.user_id AS id, a.affiliate_id AS a_id, u.phone, u.city, u.state, u.email, a.company, a.username, a.contact, a.address, a.zip, a.subscribed...
  10. thepixel

    Need to fill in empty date holes for missing data

    I'm trying to output a grid view of year/month data from a table using this query: SELECT COUNT(`id`) AS `total`, DATE_FORMAT(`report_date`,'%Y-%m') AS `group_date`, DATE_FORMAT(`report_date`,'%Y') AS `report_year`, DATE_FORMAT(`report_date`,'%m') AS `report_month`...
  11. thepixel

    Using Group By for some fields and Pagination

    I ended up resolving my issue by placing each of my non-grouped columns into aggregate functions, example: SELECT Id, MAX(First_Name) AS First_Name, MAX(Last_Name) AS Last_NAME FROM table WHERE Last_Name IS NOT NULL GROUP BY Id ORDER BY Last_Name ASC, First_Name ASC and for pagination (page 3...
  12. thepixel

    Using Group By for some fields and Pagination

    Distinct isn't working. I'm still getting multiples of the same record in my results.
  13. thepixel

    Using Group By for some fields and Pagination

    Microsoft SQL Server 2000 - 8.00.760
  14. thepixel

    Using Group By for some fields and Pagination

    I've setup a query for Pagination, however now I'm seeing that some of these records have duplicate information. I want to only group these records by a few of the columns, but also want other information along with the records. I'm used to MySQL and the Limit 0,50 feature. So, my query (page 3...
  15. thepixel

    Including file Inside class

    Yeah, i'll probably do that for now, although the compact code you sent me doesn't seem to work. It's not that important because I think i've gotten plenty of good suggestions to code the the "right way". As for my solution, any other variables on the page I may need (other than the 2 i will...
  16. thepixel

    Including file Inside class

    Well, that's not exactly how i'm using it. I have a file above the headers called process.php which allows me to process forms on any given page. It keeps all of this similar code in one file and separate from other stuff. Then I'm including my page content. The issue comes when the page is a...
  17. thepixel

    Including file Inside class

    Wow, #3 is exactly what i was looking for. And it seems much better than my recently discovered solution: <?php reset($GLOBALS); while(list($key,$val)=each($GLOBALS)){ if(($key==strstr($key,"HTTP_")) || (strstr($key,"_")==$key)) continue; //eval("global $".$key.";"); global ${$key}; }...
  18. thepixel

    Including file Inside class

    I'm trying to setup a class that will allow a file to be included on the page. It goes something like: <?php class myClass { ... ... ... function includeFile(){ if(file_exists($this->include_file)){ include($this->include_file); } else {...

Part and Inventory Search

Back
Top