[PHP-DB] Problems with INNER JOIN

2009-01-29 Thread Terion Miller
Hi Everyone! I am having problems getting an INNER JOIN to work and need some tips trouble shooting where the problem may be. What I'm trying to do is match up AdminID's from two tables and display only that users orders, sounds simple enough right...but I can't get it to return the AdminID... My

Re: [PHP-DB] Re: Problems with INNER JOIN

2009-01-29 Thread Terion Miller
;" Terion On Thu, Jan 29, 2009 at 11:56 AM, Martin Zvarík wrote: > This will work: > > $sql = " > SELECT admin.AdminID, workorders.WHAT_YOU_WANT > FROM admin > INNER JOIN workorders ON admin.AdminID=workorders.AdminID > HAVING admin.username='".$_SESSION['

Re: [PHP-DB] Re: Problems with INNER JOIN

2009-01-29 Thread Terion Miller
ery is OK. > > Try: echo mysql_error(); > > And try to remove the condition "WHERE admin.user..." if that outputs > anything. > > Martin > > > Terion Miller napsal(a): > >> Thanks Martin, oddly enough that still doesn't pull any results, it w

Re: [PHP-DB] Re: Problems with INNER JOIN

2009-01-29 Thread Terion Miller
9, 2009 at 1:28 PM, Martin Zvarík wrote: > Are you sure you have MORE than ONE [order + admin that belongs together] > in those tables? > > Now, turn on your brain and don't wait for my instructions, you already > know what to do... test test test > > > > Terion

Re: [PHP-DB] Re: Problems with INNER JOIN

2009-01-29 Thread Terion Miller
Actually I have tried EVERYTHING suggested and it just does not work, in my last query here I put in a user I know has orders and still nothing : $sql3 = "SELECT admin.AdminID, workorders.WorkOrderID, workorders.DATE_FORMAT(CreatedDate,'%m/%e/%y') AS SubmitDate, workorders.Location, workorders.Adm

Re: [PHP-DB] Re: Problems with INNER JOIN

2009-01-29 Thread Terion Miller
Yep they both work separately ... can't believe I've been stuck on the same thing all day, it seems like an easy thing... On Thu, Jan 29, 2009 at 5:09 PM, Chris wrote: > Terion Miller wrote: > >> Actually I have tried EVERYTHING suggested and it just does not work, in &

[PHP-DB] Two troublesome fields not inserting

2009-02-19 Thread Terion Miller
appy Freecycling Free the List !! www.freecycle.org Over Moderation of Freecycle List Prevents Post Timeliness. Twitter? http://twitter.com/terionmiller Facebook: http://www.facebook.com/people/Terion-Miller/1542024891"

Re: [PHP-DB] Two troublesome fields not inserting

2009-02-20 Thread Terion Miller
Yep I've echo'd the fields because I populate the form with them and they echo fine they are there they just won't go back into the db, and just those two...the others go in as a new order no problem. I would attach the whole page but I don't think the list allows it, but if anyone is interested in

[PHP-DB] comparing stored timestamp with NOW()

2009-02-24 Thread Terion Miller
: http://www.facebook.com/people/Terion-Miller/1542024891"; title="Terion Miller's Facebook profile" target=_TOP>http://badge.facebook.com/badge/1542024891.237.919247960.png"; border=0 alt="Terion Miller's Facebook profile"> Vince Lombardi - "Winning is habit. Unfortunately, so is losing."

[PHP-DB] Problems with displaying results

2009-03-03 Thread Terion Miller
nly half way as it only displays the first record in the table. Thanks Terion Happy Freecycling Free the List !! www.freecycle.org Over Moderation of Freecycle List Prevents Post Timeliness. Twitter? http://twitter.com/terionmiller

Re: [PHP-DB] Re: Problems with displaying results

2009-03-03 Thread Terion Miller
On Tue, Mar 3, 2009 at 10:32 AM, Shawn McKenzie wrote: > Terion Miller wrote: > > I have two queries one pulls out which users to use and the second pulls > > those users orders > > Looks something like this but is only pulling the first record: > > > > &g

[PHP-DB] Re: [PHP] Re: [PHP-DB] Re: Problems with displaying results

2009-03-05 Thread Terion Miller
On Tue, Mar 3, 2009 at 2:16 PM, Ashley Sheridan wrote: > On Tue, 2009-03-03 at 11:08 -0600, Terion Miller wrote: > > On Tue, Mar 3, 2009 at 10:32 AM, Shawn McKenzie >wrote: > > > > > Terion Miller wrote: > > > > I have two queries one pulls out wh

[PHP-DB] (SOLVEDV) Re: Problems with displaying results

2009-03-05 Thread Terion Miller
://twitter.com/terionmiller Facebook: http://www.facebook.com/people/Terion-Miller/1542024891"; title="Terion Miller's Facebook profile" target=_TOP>http://badge.facebook.com/badge/1542024891.237.919247960.png"; border=0 a