[EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] Extracting from an Array
> >
> > Hi John,
> >
> > > /* Using PostgreSQL: it needs $numrows and $row=0 to work. Also set it
>
> to
>
> > choose only one record in db to simp
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Extracting from an Array
>
> Hi John,
>
> /* Using PostgreSQL: it needs $numrows and $row=0 to work. Also set it
to
> chooseonly one record in db to simplify testing. Date was set
to 10
> May
> 1998*/
> // $db conect st
lmes...
>
> > -Original Message-
> > From: Andre Dubuc [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 12, 2002 9:32 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP] Extracting from an Array
> >
> > Hi John,
> >
> > Yup. I
t;2". Do you realize what I'm trying to say??
>
> ---John Holmes...
>
> > -Original Message-
> > From: Andre Dubuc [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 12, 2002 8:15 PM
> > To: Lazor, Ed
> > Cc: [EMAIL PROTECTED]
> > Subje
olmes...
> -Original Message-
> From: Andre Dubuc [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 12, 2002 8:15 PM
> To: Lazor, Ed
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Extracting from an Array
>
> Thanks Ed,
>
> Slight change -- I forgot that the de
> I have a db field, type varchar, that is actually a 'date'
> string formatted as dd-mm-. I used type 'varchar' (rather than
> type 'date') since I had to accomplish other things with it.
> Now, however, I do need to extract the Year (the last four
> digits in the array).
Ummm, are
How about just
SELECT RIGHT(fieldname,4) FROM tablename
---John Holmes...
> -Original Message-
> From: Lazor, Ed [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 12, 2002 7:09 PM
> To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Extracting f
Thanks Ed,
Slight change -- I forgot that the delimiter was a 'space'. Anyway, I still
get the first letter of the last part of the array. I guess what I need is
something that specifies a range as in something like this:
$Year = $Date[3-whatever?];
Seems rather odd that with the string as va
$sql = "select fieldname from tablename";
$Results = mysql_query($sql, $DBLink);
$Row = mysql_fetch_array($Results);
$fieldname = $Row["fieldname"];
$Date = explode("-", $fieldname);
$Year = $Date[2];
> -Original Message-
> From: Andre Dubuc [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday,
9 matches
Mail list logo