[PHP-DB] SELECT question

2001-05-16 Thread Nicholas W. Miller
Hi All, I'm building a standard shopping cart style e-commerce site using PHP and MySQL running on Apache. I store my users' cart info in this table: ++--+--+-+-+---+ | | Field | Type | Null | Key | Default | Extra | + ++--

RE: [PHP-DB] Select statements - A Quest !!!

2001-04-30 Thread Steve Brett
[EMAIL PROTECTED]] > Sent: 28 April 2001 23:53 > To: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Select statements - A Quest !!! > > > >I have two tables namely, > >1. cpkaizen : The following is the desc > &g

Re: [PHP-DB] Select statements - A Quest !!!

2001-04-28 Thread Bob Hall
>I have two tables namely, >1. cpkaizen : The following is the desc > >Field | Type | Null | Key | Default | Extra | >++--+--+-+-++ >| kno | int(10) | | PRI | NULL | auto_increment | >| loginid | varchar(20) | YES | | NULL | | >| period |

[PHP-DB] Select statements - A Quest !!!

2001-04-28 Thread Pranot Kokate
I have two tables namely, 1. cpkaizen : The following is the desc Field | Type | Null | Key | Default | Extra | ++--+--+-+-++ | kno | int(10) | | PRI | NULL | auto_increment | | loginid | varchar(20) | YES | | NULL | | | period | v

Re: [PHP-DB] SELECT query

2001-04-13 Thread Sharmad Naik
On Fri, Apr 13, 2001 at 02:23:50PM -0400, Doug Semig wrote: > Have you thought about normalizing your data model? It could make your > task a lot easier. I have normalized my table structure this is just a practice model i m trying I want that the search should be on username whereby first i se

Re: [PHP-DB] SELECT query

2001-04-13 Thread Doug Semig
Have you thought about normalizing your data model? It could make your task a lot easier. Doug At 11:33 PM 4/13/01 +0530, Sharmad Naik wrote: >I have three table called table1, table2, table3 all having fields like: >table1 contain id and username and id referencing table4 >table2 contains id a

[PHP-DB] SELECT query

2001-04-13 Thread Sharmad Naik
I have three table called table1, table2, table3 all having fields like: table1 contain id and username and id referencing table4 table2 contains id and parallel_username and id referencing table4 table3 contains id and other_username and id referencing table4 table4 is the main table containing

Re: [PHP-DB] select substring_index

2001-04-11 Thread Paul Burney
on 4/11/01 7:48 PM, Mike Baerwolf at [EMAIL PROTECTED] wrote: > SELECT substring_index( body, ". ", 2) FROM news; > > This works great from the mysql client but when I try it using php with > this: > > $result = mysql_query("SELECT substring_index(body, "." ,2) FROM news" The way you have thi

[PHP-DB] select substring_index

2001-04-11 Thread Mike Baerwolf
I have a simple news manager and I would like to display the first two sentences of a news story. I got this select statement from the mysql mailing list: SELECT substring_index( body, ". ", 2) FROM news; This works great from the mysql client but when I try it using php with this: $result =

Re: [PHP-DB] SELECT statement

2001-04-05 Thread Jeffrey A Schoolcraft
* Julio Cuz, Jr. ([EMAIL PROTECTED]) wrote: > Ron, > > Thanks for your help, but my problem still there even when I made the > following changes: > > $sql = "SELECT * FROM \"Remodel\" WHERE Email=\"".$find."\""; You don't have to quote the table name either. You can probably get away with som

Re: [PHP-DB] SELECT statement

2001-04-04 Thread Julio Cuz, Jr.
Ron, Thanks for your help, but my problem still there even when I made the following changes: $sql = "SELECT * FROM \"Remodel\" WHERE Email=\"".$find."\""; By the way, you're correct when saying that "WO" and "Email" are column names and '"$find" is what the user entered when searching for a

Re: [PHP-DB] SELECT statement

2001-04-04 Thread Ron Brogden
At 03:24 PM 4/4/2001 -0700, Julio Cuz, Jr. wrote: >Every time I run the following code, I get this error if I use a NUMBER >for the 'Email' case: >"Warning: Unable to jump to row 0 on PostgreSQL result index 2 in >/html/rccd/remodel/display2.php on line 35" The problem is that your query is equ

[PHP-DB] SELECT statement

2001-04-04 Thread Julio Cuz, Jr.
Hi-- Every time I run the following code, I get this error if I use a NUMBER for the 'Email' case: "Warning: Unable to jump to row 0 on PostgreSQL result index 2 in /html/rccd/remodel/display2.php on line 35" or, if I use a string (i.e. [EMAIL PROTECTED]), I get this error message: "Warning: P

Re: [PHP-DB] select data from a drop down box in a form

2001-04-01 Thread Gary Huntress
There are probably a million ways to do this... here is one :) (note that the file should be named "fieldtest.php" -- Regards, Gary "SuperID" Huntress === FreeSQL.org offering free database hosting to developers Visit http://superid.dyndns.or

[PHP-DB] select data from a drop down box in a form

2001-04-01 Thread Petra
I like to select data out of a drop down box in my form field from a mysql database. While I do that I also like that it reloads the page and put the relevant products of that drop down box in another field. Ex: Category 1 Category 2 Category 3 are in the drop down box and when I choose Category 1

Re: [PHP-DB] Select Database number & show it

2001-03-29 Thread Karsten Dambekalns
On Thu, Mar 29, 2001 at 05:07:43PM +0200, Mirko Cegledi wrote: > > I believe this is what you want: > > > > SELECT * FROM mydatabase LIMIT 0,5 > > I'm for this for months now. But seems not to work with Oracle 8.0.5. Could > anybody tell me how I get the first five rows of a table with oracle?

Re: FW: [PHP-DB] SELECT MAX(ID) PLUS 1

2001-03-29 Thread Bob Hall
sday, March 28, 2001 10:55 AM >To: Rubanowicz, Lisa >Subject: Re: [PHP-DB] SELECT MAX(ID) PLUS 1 > > >Are tables are to differnet, so you don't have anything on my code > >Sorry > >- Original Message - >From: Rubanowicz, Lisa <mailto:[EMAIL PROTECTED]>

RE: [PHP-DB] Select Database number & show it

2001-03-29 Thread Mirko Cegledi
> -Original Message- > From: David Balatero [mailto:[EMAIL PROTECTED]] > Sent: Thursday, March 29, 2001 4:33 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: [PHP-DB] Select Database number & show it > > > I believe this is what you want: > &

RE: [PHP-DB] Select Database number & show it

2001-03-28 Thread David Balatero
I believe this is what you want: SELECT * FROM mydatabase LIMIT 0,5 --- David Balatero [EMAIL PROTECTED] --- -Original Message- From: Naga Sean [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 28, 2001 5:06 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Select Database number & sho

[PHP-DB] Select Database number & show it

2001-03-28 Thread Naga Sean
Friends, Can you tell me how to select database between 1-5 and then show it to the web. ex : 1 xx 2 xx 3 xx 4 xx 5 xx 6 xx 7 xx 8 xx 9 xx 10 xx I think it's easy, but I'm a beginner here. so I don't know how to do that. Tha

FW: [PHP-DB] SELECT MAX(ID) PLUS 1

2001-03-28 Thread Rubanowicz, Lisa
Can anyone help me on this one Lisa -Original Message- From: Walter [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 28, 2001 10:55 AM To: Rubanowicz, Lisa Subject: Re: [PHP-DB] SELECT MAX(ID) PLUS 1 Are tables are to differnet, so you don't have anything on my code

[PHP-DB] SELECT MAX(ID) PLUS 1

2001-03-28 Thread Rubanowicz, Lisa
Hi All, I have been driven maad with this now for about a week and have looked all around for the answer but seem to get sent off in a tangent any time I get close. My SELECT statement seems to be right when I run it in MySQLFront but to add 1 in PHP .. Here is the story. I have a

Re: [PHP-DB] Select where date is in period

2001-03-22 Thread Boclair
"boclair" <[EMAIL PROTECTED]> wrote in message 005101c0b2d2$4e6b3920$[EMAIL PROTECTED]">news:005101c0b2d2$4e6b3920$[EMAIL PROTECTED]... | | - Original Message - | From: boclair <[EMAIL PROTECTED]> | To: <[EMAIL PROTECTED]> | Sent: Thursday, March 22,

Re: [PHP-DB] Select where date is in period

2001-03-22 Thread boclair
- Original Message - From: Steve Brett <[EMAIL PROTECTED]> To: boclair <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, March 22, 2001 11:04 PM Subject: RE: [PHP-DB] Select where date is in period > i think i also used >= to indicate 'equal o

Re: [PHP-DB] Select where date is in period

2001-03-22 Thread boclair
- Original Message - From: boclair <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 22, 2001 10:45 PM Subject: Re: [PHP-DB] Select where date is in period > > ___Morris___ > > The database has a table of equipments with date fields for > d

RE: [PHP-DB] Select where date is in period

2001-03-22 Thread Steve Brett
Message- > From: boclair [mailto:[EMAIL PROTECTED]] > Sent: 22 March 2001 12:45 > To: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Select where date is in period > > > > ___Morris___ > > The database has a table of equipments with date fields for > date_

RE: [PHP-DB] Select where date is in period

2001-03-22 Thread Steve Brett
dicated by an authorised representative independently of this message." Egton Medical Information Systems Limited. Registered in England. No 2117205. Registered Office: Park House Mews, 77 Back Lane, Off Broadway, Horsforth, Leeds, LS18 4RF > -Original Message- > From: bocl

Re: [PHP-DB] Select where date is in period

2001-03-22 Thread boclair
___Morris___ The database has a table of equipments with date fields for date_online and date_offline. The requirement is to find which equipments were available on a date specified by the user, this being a variable created by the user. My attempts at scripting for the condition where the dat

RE: [PHP-DB] Select where date is in period

2001-03-22 Thread Allsebrook_Richard/askr
BDY.RTF -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP-DB] Select where date is in period

2001-03-21 Thread boclair
The database has a table of equipments with date fields for date_online and date_offline. The requirement is to find which equipments were available on a date specified by the user, this being a variable created by the user. My attempts at scripting for the condition where the date_online <= '

Re: [PHP-DB] Select where

2001-03-20 Thread Beau Lebens
>___ > > > $query = "SELECT * FROM members where status='deceased'" > > > > Then just call the $query in your script >___ > >Thanks, I only gave the mySQL but the php scripting is > > >$deceased = mysql_query(SELECT * FROM members where >status=\'de

RE: [PHP-DB] Select where

2001-03-20 Thread Chris Andrew
ct: Re: [PHP-DB] Select where > > > > - Original Message - > From: boclair <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, March 21, 2001 12:02 AM > Subject: [PHP-DB] Select where > > > > This is simple but I cannot see where

Re: [PHP-DB] Select where

2001-03-20 Thread boclair
- Original Message - From: Darryl Friesen <[EMAIL PROTECTED]> To: boclair <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, March 21, 2001 1:22 AM Subject: Re: [PHP-DB] Select where > > Thanks, I only gave the mySQL but the php scripting is > &g

Re: [PHP-DB] Select where

2001-03-20 Thread Darryl Friesen
> Thanks, I only gave the mySQL but the php scripting is > > $deceased = mysql_query(SELECT * FROM members where > status=\'deceased\'"); > and later > while ($myrow = mysql_fetch_row($deceased)) > > MySQL now says in relation to the *while* line > Warning: Supplied argument is no

Re: [PHP-DB] Select where

2001-03-20 Thread boclair
- Original Message - From: boclair <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 21, 2001 12:02 AM Subject: [PHP-DB] Select where > This is simple but I cannot see where I am going wrong > > I have a table members with one of the fields

Re: [PHP-DB] Select where

2001-03-20 Thread ben
On Wed, 21 Mar 2001, boclair wrote: > This is simple but I cannot see where I am going wrong > > I have a table members with one of the fields > status, varchar(10) > > The values may be active or retired or deceased or null > > If I run the select > > SELECT * FROM members WHERE status = 'd

[PHP-DB] Select where

2001-03-20 Thread boclair
This is simple but I cannot see where I am going wrong I have a table members with one of the fields status, varchar(10) The values may be active or retired or deceased or null If I run the select SELECT * FROM members WHERE status = 'deceased'; I getMySQL said: You have an error in your

[PHP-DB] SELECT * vs. SELECT field, field, field

2001-03-14 Thread olinux
A quick question, which executes faster ? Suppose i have a table with 6 fields and I need to use all of the info in the table, SELECT * FROM $table_name WHERE id = \"$id\" or SELECT field1, field2, field3, field4, field5, field6 FROM $table_name WHERE id = \"$id\" I understand that they do t

[PHP-DB] Select just the first two letters in a column (MySQL)

2001-03-08 Thread John Guynn
Is there a way to select just the first two letters in a column? I have a column that contains values like TT1, TT2, TT3, TT4, PR1, PR2, RD1, RD2, RD3, and I'd like to SELECT DISTINCT the first two letters. In otherwords have the select statement return TT, PR, RD. Any ideas? John Guynn This

Re: [PHP-DB] SELECT problem

2001-02-23 Thread JJeffman
echo(""); HTH Jayme. -Mensagem Original- De: Julio Cuz, Jr. <[EMAIL PROTECTED]> Para: <[EMAIL PROTECTED]> Enviada em: quinta-feira, 22 de fevereiro de 2001 18:33 Assunto: [PHP-DB] SELECT problem > Hi-- > > What's wrong with this l

AW: [PHP-DB] SELECT problem (2)

2001-02-22 Thread Matthias Kopolt
An: [EMAIL PROTECTED] Betreff: [PHP-DB] SELECT problem (2) Hi-- Sorry, I forgot to finish the previous e-mail: What's wrong with this line? echo(""); I'm trying to RELOAD the current page with the new value of "$campus" after the user selects a campus fro

RE: [PHP-DB] SELECT problem (2)

2001-02-22 Thread Mark Newnham
You probably want this.options[this.selectedIndex].value > -Original Message- > From: Julio Cuz, Jr. [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 22, 2001 2:36 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] SELECT problem (2) > > > Hi-- > >

[PHP-DB] SELECT problem (2)

2001-02-22 Thread Julio Cuz, Jr.
Hi-- Sorry, I forgot to finish the previous e-mail: What's wrong with this line? echo(""); I'm trying to RELOAD the current page with the new value of "$campus" after the user selects a campus from a drop-down menu. But I can't get the "this.value" line to pass the value of "$campus" to the

[PHP-DB] SELECT problem

2001-02-22 Thread Julio Cuz, Jr.
Hi-- What's wrong with this line of code? echo(""); Julio Cuz, Jr. Riverside Community College [EMAIL PROTECTED]

Re: [PHP-DB] select with parentID field into multidimensional array?

2001-01-21 Thread nuitari
rote: > > > Date: Sun, 21 Jan 2001 15:50:16 -0500 > > From: [EMAIL PROTECTED] > > To: [EMAIL PROTECTED] > > Subject: Re: [PHP-DB] select with parentID field into multidimensional > > array? > > > > Hi, > > > > Maybe it would be better not t

Re: [PHP-DB] select with parentID field into multidimensional array?

2001-01-21 Thread Stephen
page. If I work it out Ill be sure to post it :) On Sun, 21 Jan 2001 [EMAIL PROTECTED] wrote: > Date: Sun, 21 Jan 2001 15:50:16 -0500 > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] select with parentID field into multidimensional > array? > > Hi

Re: [PHP-DB] select with parentID field into multidimensional array?

2001-01-21 Thread nuitari
21 Jan 2001, Stephen wrote: > > > Date: Sun, 21 Jan 2001 23:49:13 +1100 (EST) > > From: Stephen <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED] > > Subject: [PHP-DB] select with parentID field into multidimensional array? > > > > Hi > > > > I have a table

Re: [PHP-DB] select with parentID field into multidimensional array?

2001-01-21 Thread Stephen
23:49:13 +1100 (EST) > From: Stephen <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: [PHP-DB] select with parentID field into multidimensional array? > > Hi > > I have a table which is set out like this > > ID name parentID > > I "select * fro

[PHP-DB] select with parentID field into multidimensional array?

2001-01-21 Thread Stephen
Hi I have a table which is set out like this ID name parentID I "select * from table" into $result. I then wish to walk through the result such that it creates a multidimensional array sorted with children under parents. Here is a basic eg. ID nameparentID 1 books 0 2 m

<    1   2   3   4