Re: [PHP-DB] stumped by "order by"

2004-12-19 Thread Jochem Maas
Stuart Felenstein wrote: --- Jochem Maas <[EMAIL PROTECTED]> wrote: > The problem is when I click the column sorter link and > the page re-loads, it looks like the where array is > getting wiped out, values are gone. I get a "divison > by zero" error. I'm assuming this is becasue the is this err

Re: [PHP-DB] stumped by "order by"

2004-12-19 Thread Bastien Koert
the array code to set it properly...then save that array set to the session var... bastien From: Stuart Felenstein <[EMAIL PROTECTED]> To: Jochem Maas <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [PHP-DB] stumped by "order by" Date: Sun, 19 Dec 20

Re: [PHP-DB] stumped by "order by"

2004-12-19 Thread Stuart Felenstein
--- Jochem Maas <[EMAIL PROTECTED]> wrote: > > The problem is when I click the column sorter > link and > > the page re-loads, it looks like the where array > is > > getting wiped out, values are gone. I get a > "divison > > by zero" error. I'm assuming this is becasue the > > is this erro

Re: [PHP-DB] stumped by "order by"

2004-12-19 Thread Jochem Maas
hi Stu, ... > > Okay I wasn't sure but thought I might need to add > another query statement in. So it would have made it > work except! , I found a new problem with this issue. > > Hopefully I can clearly explain it. > There is a default $orderParam_rsVJ set up. So when > the results are returne

RE: [PHP-DB] stumped by "order by"

2004-12-19 Thread Stuart Felenstein
--- Bastien Koert <[EMAIL PROTECTED]> wrote: > Hi Stu > > something like > > Bif(!empty($s_Ind)) $aWHERE[] = "Jobs.Industry IN > ($s_Ind)" ; > if(!empty($s_State)) $aWHERE[] = "Jobs.State IN > ($s_State)"; > if(!empty($s_TType)) $aWHERE[] = "Jobs.Term IN > ($s_TType)"; > if(!empty($JTitle)) $aW

RE: [PHP-DB] stumped by "order by"

2004-12-19 Thread Bastien Koert
Hi Stu something like $query_rsVJ = " SELECT Jobs.PostStart, Jobs.JobID,Jobs.JobTitle, Jobs.City, Ind.Categories, VendorSignUp.CompanyName, US.States, Term.Tax FROM Jobs INNER JOIN Ind ON (Jobs.Industry = Ind.CIDs) INNER JOIN US ON (Jobs.State = US.SID) INNER JOIN SignUp ON (Jobs.VID = SignUp.VID)

Re: [PHP-DB] stumped-mail and database

2004-12-08 Thread Stuart Felenstein
--- Stuart Felenstein <[EMAIL PROTECTED]> wrote: > > --- Jason Wong <[EMAIL PROTECTED]> wrote: > > > > > Also just to be certain that you *are* running > those > > lines of code change the > > echo $to, to echo "Before $to" & echo "After $to" > or > > something. > > Some may remember my prob

Re: [PHP-DB] stumped-mail and database

2004-12-07 Thread Stuart Felenstein
--- Jason Wong <[EMAIL PROTECTED]> wrote: > > Also just to be certain that you *are* running those > lines of code change the > echo $to, to echo "Before $to" & echo "After $to" or > something. > Well now I feel like a damn jackass. I just discovered something that doesnt fix the issue, yet r

Re: [PHP-DB] stumped-mail and database

2004-12-07 Thread Jason Wong
On Tuesday 07 December 2004 19:15, Stuart Felenstein wrote: > --- Jason Wong <[EMAIL PROTECTED]> wrote: Please be explicit, do you mean this what you get?: > > What happens when you do this: > > > > $to = $rsVendorJobs->fields('Conmail'); Call to a member function on a non-object > > echo $to; N

Re: [PHP-DB] stumped-mail and database

2004-12-07 Thread Stuart Felenstein
--- Jason Wong <[EMAIL PROTECTED]> wrote: > What happens when you do this: > > $to = $rsVendorJobs->fields('Conmail'); > echo $to; > echo $rsVendorJobs->fields('Conmail'); > $to = $rsVendorJobs->fields('Conmail'); > echo $to; > Same thing: Call to a member function on a non-object in.. Stuart

Re: [PHP-DB] stumped-mail and database

2004-12-07 Thread Jason Wong
On Tuesday 07 December 2004 18:13, Stuart Felenstein wrote: > Here is what's freaking me out ! :) > > Anywhere on the page I can do a > fields('Conmail');?> > > And it will echo out the correct value, > > But! as soon as I do a > $to = $rsVendorJobs->fields('Conmail'); > > I get a "Fatal error: Ca

Re: [PHP-DB] stumped-mail and database

2004-12-07 Thread Stuart Felenstein
--- Jochem Maas <[EMAIL PROTECTED]> wrote: > I just thought, if your query object ($) is > returning a > resultset object then maybe you have to 'loop' the > resultset object > in order to retrieve the 'row' object(s) from which > you can retrieve the > data. > Yes, but the recordset (or r

Re: [PHP-DB] stumped-mail and database

2004-12-06 Thread Jochem Maas
I just thought, if your query object ($) is returning a resultset object then maybe you have to 'loop' the resultset object in order to retrieve the 'row' object(s) from which you can retrieve the data. your resultset object doesn't have a GetRowAssoc() method? [ defined as &GetRowAssoc($uppe

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Norland, Martin
> var_dump($rsVendorJobs); > > object(kt_adorecordset_mysql)(33) { ["dataProvider"]=> Looks like you're using the ADODB library ( http://www.certicamara.com/consulta/lib/adodb/docs-adodb.htm ) or similar. ( That may not be the official site, I just bounced around a bit. ) All your previous code

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Stuart Felenstein
--- "Norland, Martin" <[EMAIL PROTECTED]> wrote: > (Bear with me on this, because I've got nothing > remaining to go on...) > What do you get from: > > var_dump($query_rsVendorJobs); > var_dump($totalRows_rsVendorJobs); > var_dump($->SelectLimit($query_rsVendorJobs)); >

Re: [PHP-DB] stumped-mail and database

2004-12-06 Thread Jochem Maas
Stuart Felenstein wrote: --- "Norland, Martin" <[EMAIL PROTECTED]> wrote: All I can recommend from here is heavy use of printr() or var_dump() on your variables. They are NULL. That is the problem. I can't for the life of me , figure out a way to initialize these variables. be more specific - it

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Norland, Martin
-Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] > They are NULL. That is the problem. I can't for the life of me , figure out a way to > initialize these variables. (Bear with me on this, because I've got nothing remaining to go on...) What do you get from:

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Stuart Felenstein
--- "Norland, Martin" <[EMAIL PROTECTED]> wrote: > All I can recommend from here is heavy use of > printr() or var_dump() on > your variables. > They are NULL. That is the problem. I can't for the life of me , figure out a way to initialize these variables. > Obviously, also, you'll want to

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Norland, Martin
All I can recommend from here is heavy use of printr() or var_dump() on your variables. > $totalRows_rsVendorJobs = $rsVendorJobs->RecordCount(); // end Recordset This clearly means $rsVendorJobs is an object of some sort, probably some custom recordset object as you've said - so your best bet is

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Stuart Felenstein
--- "Norland, Martin" <[EMAIL PROTECTED]> wrote: > What is $rsVendorJobs It's a "recordset" which for lack of a better definition is a sql query. > > Is $rsVendorJobs just the result of a mysql_query()? > If so, you probably > just want to be using: > > $to = $rsVendorJobs['Conmail']; Nope, t

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Norland, Martin
:37 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] stumped-mail and database --- "Norland, Martin" <[EMAIL PROTECTED]> wrote: > 1) change > $to = "$rsVendorJobs->Fields('Conmail')"; > To > $to = "{$rsVendorJobs->Fields(&#

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Stuart Felenstein
--- "Norland, Martin" <[EMAIL PROTECTED]> wrote: > 1) change > $to = "$rsVendorJobs->Fields('Conmail')"; > To > $to = "{$rsVendorJobs->Fields('Conmail')}"; > Or just > $to = $rsVendorJobs->Fields('Conmail'); > > 2) change > $body = '$cl'; > To > $body = $cl; > Well I'm sure

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Stuart Felenstein
--- Bastien Koert <[EMAIL PROTECTED]> wrote: > I prefer to assign the db values to loca variables > to ensure that I am > sending out exactly what I need to. > Well the binding is one where clause that pulls the correct record for the transaction. Following what you are saying, how does that

Re: [PHP-DB] stumped-mail and database

2004-12-06 Thread Jochem Maas
er, I don't know if it would interest you but here is a class I have been using for ages now (not that I have trouble using mail() for simple jobs) because its simple, packed with functionality and works well: http://phpmailer.sourceforge.net/ the following page hopefully demonstrates how simple

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Norland, Martin
-Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] > Here is what I tried: > > $to = "$rsVendorJobs->Fields('Conmail')"; > $subject = $rsVendorJobs->Fields('RefEm'); > $body = '$cl'; > $headers = "From: [EMAIL PROTECTED]"; mail($to,$subject,$body,$headers); > echo "Mail

RE: [PHP-DB] stumped-mail and database

2004-12-06 Thread Bastien Koert
I prefer to assign the db values to loca variables to ensure that I am sending out exactly what I need to. Bastien From: Stuart Felenstein <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: [PHP-DB] stumped-mail and database Date: Mon, 6 Dec 2004 10:05:57 -0800 (PST) I'm trying to send mail out b

RE: [PHP-DB] Stumped with proper query & display

2004-04-08 Thread Mignon Hunter
Thank you FG - this is exactly what I needed. I think I 've got the query perfect, but how best to display like: 5 jane doe send_rep 4 mignon hunter tic 2-3, send_rep here's my query: $query = "SELECT cust.id, first, last, company, choice FROM cust, contact where cust.id = contact.id"; while ($r

RE: [PHP-DB] Stumped with proper query & display

2004-04-08 Thread fgc
Hi all, new to the list :) I would try something like this: Select name, company, choice >From Table1, Table2 Where Table1.id = Table2.id; Fg > Can someone please help me or direct me to some scripts that might get > me unstuck, as I've not done this kind of query before. > > To simplify: >

Re: [PHP-DB] Stumped with proper query & display

2004-04-08 Thread Mignon Hunter
Tables are listed below the code I couldnt get the foreach to work properly that Brent sent..I keep getting: "Invalid argument supplied for foreach() ". I've tried lots of different stuff but here's an example: * $query = "SELECT * FROM cust"

Re: [PHP-DB] Stumped with proper query and display

2004-04-07 Thread Jason Wong
On Wednesday 07 April 2004 21:18, Mignon Hunter wrote: > I never saw this email come across - I think it got caught in spam software > on 4-1 Check the archives. > > > Well I'm still working on this off and on - still having problems :| > >

RE: [PHP-DB] Stumped with proper query and display

2004-04-07 Thread Mignon Hunter
I never saw this email come across - I think it got caught in spam software on 4-1 Well I'm still working on this off and on - still having problems :| I couldnt get the foreach to work properly..I keep getting: "Invalid argument supplied

Re: [PHP-DB] Stumped with proper query & display

2004-04-01 Thread Mignon Hunter
Well I'm still working on this off and on - still having problemos :| I couldnt get the foreach to work properly..I keep getting: "Invalid argument supplied for foreach() ". I've tried lots of different stuff but here's an example: * $query =

Re: [PHP-DB] Stumped with proper query & display

2004-03-26 Thread Brent Baisley
The way I handle queries like this is to use an associative array with the ID as the named index key. You then loop through the data consolidating the choices and linking the other data based on id. Since you are using a named index, it doesn't matter how your data is sorted. //Consolidate your

Re: [PHP-DB] Stumped with proper query & display

2004-03-26 Thread Mignon Hunter
need to query. I guess I can get the data I want by selecting all from the 5 tables then parsing" Send your tables structure. - Original Message - From: "Mignon Hunter" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 26, 2004 3:07 PM Subject: Re:

Re: [PHP-DB] Stumped with proper query & display

2004-03-26 Thread Ricardo Lopes
r" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 26, 2004 3:07 PM Subject: Re: [PHP-DB] Stumped with proper query & display Can someone please help me or direct me to some scripts that might get me unstuck, as I've not done this kind of query before.

Re: [PHP-DB] Stumped with proper query & display

2004-03-26 Thread Mignon Hunter
Can someone please help me or direct me to some scripts that might get me unstuck, as I've not done this kind of query before. To simplify: Table 1 id 1 Name John Doe company IBM Table 2 id1 choice choice #1 id

RE: [PHP-DB] Stumped...

2003-01-10 Thread NIPP, SCOTT V (SBCSI)
:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 10:06 AM To: NIPP, SCOTT V (SBCSI); 'Hutchins, Richard'; '[EMAIL PROTECTED]' Subject: RE: [PHP-DB] Stumped... Out of curiosity, what was the solution? It's always good to learn from someone else's mistakes ... :)

RE: [PHP-DB] Stumped...

2003-01-10 Thread Matthew Moldvan
/ecommerce/ --- -Original Message- From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 1:42 PM To: 'Hutchins, Richard'; '[EMAIL PROTECTED]' Subject: RE: [PHP-DB] Stumped... Nevermind. I just stumbled across the nature of m

RE: [PHP-DB] Stumped...

2003-01-09 Thread NIPP, SCOTT V (SBCSI)
, SCOTT V (SBCSI); '[EMAIL PROTECTED]' Subject: RE: [PHP-DB] Stumped... Post your SQL statement. > -Original Message- > From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 09, 2003 1:37 PM > To: '[EMAIL PROTECTED]' > Subject:

Re: [PHP-DB] Stumped...

2003-01-09 Thread Jim
it sounds like you are doing an INSERT and the table has fewer columns then the VALUES clause has. Check your code for an INSERT statement then match your values up with the table structure, check for hidden commas in your value information. Jim ---Original Message--- From: NIPP,

RE: [PHP-DB] Stumped...

2003-01-09 Thread Hutchins, Richard
Post your SQL statement. > -Original Message- > From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 09, 2003 1:37 PM > To: '[EMAIL PROTECTED]' > Subject: [PHP-DB] Stumped... > > > I am getting an error that is proving very difficult to > isolate and >