Re: [PHP-DB] Query Case In-sensitive

2003-11-19 Thread roy.a.jones
7:11 To [EMAIL PROTECTED] cc Subject Re: [PHP-DB] Query Case In-sensitive Use "LIKE" clause instead of "=" SELECT item_number FROM item WHERE item_code LIKE 'M1234' ; This will perform case-insensitive matching on all databases I used before (Including Oracle,

Re: [PHP-DB] Query Case In-sensitive

2003-11-19 Thread mustafa ocak
ki" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, November 18, 2003 5:46 AM Subject: Re: [PHP-DB] Query Case In-sensitive > Generally in DBs, data is case sensitive. > > Simply you can do an uppercase or lowercase conversion in both

Re: [PHP-DB] Query Case In-sensitive

2003-11-18 Thread Andrei Migatchev
se respond to <[EMAIL PROTECTED]> To <[EMAIL PROTECTED]> cc Subject [PHP-DB] Query Case In-sensitive Is there a way to run a query so that it ignores the case, and the query is not case sensitive? The data being stored is "m1234" Query Select item number fro

Re: [PHP-DB] Query Case In-sensitive

2003-11-17 Thread ramki
> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 18, 2003 1:23 AM Subject: [PHP-DB] Query Case In-sensitive > Is there a way to run a query so that it ignores the case, and the query > is not case sensitive? > > The data being stored is "m1234" > > Quer

Re: [PHP-DB] Query Case In-sensitive

2003-11-17 Thread Pedro Pais
Hey! At least in Postgresql you can do something like: SELECT * FROM table where item_code ILIKE 'blabla'; But I guess it's standard, so you can use it in any DB. Larry Sandwick wrote: Is there a way to run a query so that it ignores the case, and the query is not case sensitive? The data b

Re: [PHP-DB] Query Case In-sensitive

2003-11-17 Thread CPT John W. Holmes
From: "Larry Sandwick" <[EMAIL PROTECTED]> > Is there a way to run a query so that it ignores the case, and the query > is not case sensitive? What's this have to do with PHP and what database are you using? ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP-DB] Query Case In-sensitive

2003-11-17 Thread roy.a.jones
t;[EMAIL PROTECTED]> 17-Nov-2003 14:53 Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject [PHP-DB] Query Case In-sensitive Is there a way to run a query so that it ignores the case, and the query is not case sensitive? The data being stored is "m1234"

[PHP-DB] Query Case In-sensitive

2003-11-17 Thread Larry Sandwick
Is there a way to run a query so that it ignores the case, and the query is not case sensitive? The data being stored is "m1234" Query Select item number from item where item_code = "M1234" ; The query above should return the data above. TIA Larry Sandwick Sarreid, Ltd. Ne

Re: [PHP-DB] Query or code?

2003-11-06 Thread Peter Beckman
On Thu, 6 Nov 2003, John W. Holmes wrote: > I'd still like an answer to this question. Why is there a need for a > separate table with scores? The log is a "snapshot" in time -- what was the "total points" at the time of the log entry. The score table is always the accurate current score. >

Re: [PHP-DB] Query or code?

2003-11-06 Thread John W. Holmes
[EMAIL PROTECTED] wrote: On Thu, 6 Nov 2003, CPT John W. Holmes wrote: From: "Peter Beckman" <[EMAIL PROTECTED]> I have this data: Table Log: appid userid points datetype Table Score: appid userid score I want to verify that the last entry in table log of type "x" is equal to the sum

Re: [PHP-DB] Query or code?

2003-11-06 Thread beckman
On Thu, 6 Nov 2003, CPT John W. Holmes wrote: > From: "Peter Beckman" <[EMAIL PROTECTED]> > > > I have this data: > > > > Table Log: appid userid points datetype > > Table Score: appid userid score > > > > I want to verify that the last entry in table log of type "x" is equal to > >

Re: [PHP-DB] Query or code?

2003-11-06 Thread CPT John W. Holmes
From: "Peter Beckman" <[EMAIL PROTECTED]> > I have this data: > > Table Log: appid userid points datetype > Table Score: appid userid score > > I want to verify that the last entry in table log of type "x" is equal to > the sum of the scores in table score for the same appid and us

[PHP-DB] Query or code?

2003-11-06 Thread Peter Beckman
I have this data: Table Log: appid userid points datetype Table Score: appid userid score I want to verify that the last entry in table log of type "x" is equal to the sum of the scores in table score for the same appid and userid. Can I do this in SQL easily? My problem is selec

RE: [PHP-DB] Query Error

2003-11-04 Thread Robert Sossomon
or a horse! -Original Message- From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 04, 2003 1:31 PM To: Robert Sossomon; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Query Error From: "Robert Sossomon" <[EMAIL PROTECTED]> > The err

Re: [PHP-DB] Query Error

2003-11-04 Thread CPT John W. Holmes
From: "Robert Sossomon" <[EMAIL PROTECTED]> > The errors as it prints are: > > The query I just ran was: select * from GCN_items where `item_num` = > '%fm-a294%' > The query I just ran was: Resource id #2 > 0 Those aren't errors; it's just what you asked the script to display. Your query simply

RE: [PHP-DB] Query Error

2003-11-04 Thread Robert Sossomon
t Sossomon; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Query Error From: "Robert Sossomon" <[EMAIL PROTECTED]> > And here is the additem.php file where it check for the info in the > field and it is erroring out. It would be rather useful to know the error... > $get_

Re: [PHP-DB] Query Error

2003-11-04 Thread CPT John W. Holmes
From: "Robert Sossomon" <[EMAIL PROTECTED]> > And here is the additem.php file where it check for the info in the > field and it is erroring out. It would be rather useful to know the error... > $get_iteminfo = "select * from GCN_items where 'item_num' LIKE > '%$_POST[sel_item_id]%'"; Take aw

[PHP-DB] Query Error

2003-11-04 Thread Robert Sossomon
I've been racking my brain and the web for finding a solution and no luck so far. Here's the form: $display_block .= "Input item: Item ID:Quantity: "; $display_block .= "01"; for ($i=2; $i < 301; $i++){ $display_block .= "$i"; } $display_block .= "Price:"; And here is the additem.php file w

Re: [PHP-DB] Query works but can't echo variable :'(

2003-10-26 Thread Micah Stevens
You're using an alias of 'date' instead of DateOfOrder, so that should be reflected in the array key. So: $Date = $OrderDate["date"]; -Micah On Sun October 26 2003 4:22 pm, Graeme McLaren wrote: > Hey everyone, the following query and code works fine but I can't > understand why I can't echo

[PHP-DB] Query works but can't echo variable :'(

2003-10-26 Thread Graeme McLaren
Hey everyone, the following query and code works fine but I can't understand why I can't echo the $Date variable. I guess it doesn't work fine then :( Any ideas ? G :) $TheDate = mysql_query("select DATE_FORMAT(DateOfOrder, '%d, %m, %Y') as date from Orders Where Orders.ID = '$TransID'"); whil

Re: [PHP-DB] query for multiple values

2003-10-15 Thread Ignatius Reilly
SELECT * FROM table WHERE column IN ( 'this', 'that', 'theother' ) Ignatius _ - Original Message - From: "Robbie Staufer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 16

[PHP-DB] query for multiple values

2003-10-15 Thread Robbie Staufer
Hi, Is there a way to construct a mysql query that will select * for multiple values in the same column? For example: "SELECT * FROM table WHERE column = 'this' and 'that' and 'theother'" Thanks, Robbie -- -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* Robbie Staufer NCAR/SCD 1850 Tabl

AW: [PHP-DB] query problem

2003-10-02 Thread Lars Jedinski
ngliche Nachricht- > Von: Doug Parker [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 2. Oktober 2003 20:31 > An: [EMAIL PROTECTED] > Betreff: [PHP-DB] query problem > > > I'm having a problem with a specific query. > > SELECT DISTINCT(contents_.company_id)

[PHP-DB] query problem

2003-10-02 Thread Doug Parker
I'm having a problem with a specific query. SELECT DISTINCT(contents_.company_id), companies.* FROM contents_, companies WHERE contents_.Products LIKE '%heating%' OR contents_.Manufacturer LIKE '%heating%' AND contents_.company_id = companies.id The query works fine without the "OR" segment, for

[PHP-DB] Query FIlter in GUI

2003-09-22 Thread dpgirago
Thank you CPT John W. Holmes. I'll give it a try. David

Re: [PHP-DB] Query Filter in GUI

2003-09-22 Thread CPT John W. Holmes
From: <[EMAIL PROTECTED]> > I have a PHP GUI in which a select box gets populated by a query of a > MySQL DB for all CD's by all artists when the page is first opened. I am > now trying to implement > the same query but with a WHERE clause that filters the returned CD's to > be displayed in the sa

RE: [PHP-DB] Query Filter in GUI

2003-09-22 Thread Griffiths, Daniel
how are you testing the check boxes?, looks like the the query string is empty because both the tests you are doing in the code below return false. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 22 September 2003 15:01 To: [EMAIL PROTECTED] Subject: [PHP-DB

[PHP-DB] Query Filter in GUI

2003-09-22 Thread dpgirago
Good Morning PHP-DB Listers, I have a PHP GUI in which a select box gets populated by a query of a MySQL DB for all CD's by all artists when the page is first opened. I am now trying to implement the same query but with a WHERE clause that filters the returned CD's to be displayed in the same

Re: [PHP-DB] Query runs fine on Console but not in PHP

2003-08-20 Thread Robert Twitty
--- Original Message - > From: "Robert Twitty" <[EMAIL PROTECTED]> > To: "vish.kohli" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Monday, August 18, 2003 8:28 AM > Subject: Re: [PHP-DB] Query runs fine on Console but not in PHP > >

Re: [PHP-DB] Query runs fine on Console but not in PHP

2003-08-19 Thread vish.kohli
Message - From: "Robert Twitty" <[EMAIL PROTECTED]> To: "vish.kohli" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, August 18, 2003 8:28 AM Subject: Re: [PHP-DB] Query runs fine on Console but not in PHP > What platform are you using? Since

Re: [PHP-DB] Query runs fine on Console but not in PHP

2003-08-18 Thread Robert Twitty
What platform are you using? Since it appears that the script is crashing, you are probably on Linux or some other UNIX flavor. If this is the case, the TDS protocol setting may not be correct. What type of date are you retrieving with this stored procedure? -- bob On Sun, 17 Aug 2003, vish.ko

[PHP-DB] Query runs fine on Console but not in PHP

2003-08-17 Thread vish.kohli
Hi, I am trying to execute a stored procedure in PHP via mssql_query () function. I pass 8 parameters to it. The query runs fine in SQL Query Analyzer but when I run it thru PHP, it behaves strangely. I can get number of rows (mssql_num_rows()) and number of fields (mssql_num_fields()) in PHP, but

[PHP-DB] Query Cache not Working? MySQL 4.0.14-standard

2003-08-14 Thread Matt Babineau
For some reason my MySQL doesn't seem to be caching queries! Is there a manual config change that needs to be made or do I need to rebuild mysql some special way? I couldn't find anythign in the docs about this, but it would greatly help my PHP pages if it were caching properly! Thanks, Matt m

Re: [PHP-DB] Query Cache not Working? MySQL 4.0.14-standard

2003-08-14 Thread CPT John W. Holmes
From: "Matt Babineau" <[EMAIL PROTECTED]> > For some reason my MySQL doesn't seem to be caching queries! And you expect PHP to solve this how? Do you want PHP to cache the queries? You must say please... You need to set the four variables mentioned at the following URL in your my.cnf file. http:

[PHP-DB] query is returning over 74,000 results and taking 30 seconds - HELP!

2003-08-04 Thread Aaron Wolski
Hi Guys, I've tried several different things with the following 2 queries but nothing seem to help. I've stared at the code and reworked it for hours on end and frankly I am getting frustrated. I'm only posting the queries themselves without the PHP code as the entire section is quite long. If

Re: [PHP-DB] query works fine on console but not with PHP - why?

2003-08-03 Thread Doug Thompson
You have an error in your PHP code, just as the error says. Including only the query, which you've already tested, isn't very helpful. The error message is telling you that the result "link identifier" used in your fetch statement isn't the same as returned by the query statement OR there was an

Re: [PHP-DB] query works fine on console but not with PHP - why?

2003-08-03 Thread Matthew McNicol
; To: <[EMAIL PROTECTED]> Sent: Sunday, August 03, 2003 2:59 PM Subject: [PHP-DB] query works fine on console but not with PHP - why? > Hi guys, > > I have the following query which returns FINE through the console but > not in PHP > > > select t.id, t.colour, t

RE: [PHP-DB] query works fine on console but not with PHP - why? SOLVED

2003-08-03 Thread Aaron Wolski
ts! Aaron -Original Message- From: Matt [mailto:[EMAIL PROTECTED] Sent: August 3, 2003 10:11 AM To: Aaron Wolski; [EMAIL PROTECTED] Subject: Re: [PHP-DB] query works fine on console but not with PHP - why? - Original Message - From: "Aaron Wolski" <[EMAIL PROTECTED]> To

Re: [PHP-DB] query works fine on console but not with PHP - why?

2003-08-03 Thread Matt
- Original Message - From: "Aaron Wolski" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 03, 2003 9:59 AM Subject: [PHP-DB] query works fine on console but not with PHP - why? > The error I am getting on the browser is: > > Warning

[PHP-DB] query works fine on console but not with PHP - why?

2003-08-03 Thread Aaron Wolski
Hi guys, I have the following query which returns FINE through the console but not in PHP select t.id, t.colour, t.colourID, t.price, t.type, g.thread_index, g.groupNameUrl FROM kcs_threads t LEFT JOIN kcs_threadgroups g ON t.id = g.thread_index WHERE g.groupNameUrl = '0-500' The error I

Re: [PHP-DB] query, display and grouping.. one way works but notanother

2003-07-26 Thread John W. Holmes
Aaron Wolski wrote: Hi Guys, Have a multiple select box. I'm trying to group columns and display records under their paired groupings. [snip] What I'd like is to display them like: Manufactuer - Type Manufacturer - Type Manufacturer - Type I tried this code but only seems to group one T

[PHP-DB] query, display and grouping.. one way works but not another

2003-07-26 Thread Aaron Wolski
Hi Guys, Have a multiple select box. I'm trying to group columns and display records under their paired groupings. Code: echo "\n"; $query = "select t.manufacturer, t.id, t.colour, t.colourID, t.type, p.thread_index FROM kcs_threads t LEFT JOIN kcs_patternthreads p ON t.id = p.thread_index

RE: [PHP-DB] query and display acting weird...

2003-07-25 Thread Aaron Wolski
As usual. John knows best. Thanks! Aaron -Original Message- From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] Sent: July 25, 2003 3:05 PM To: Aaron Wolski; [EMAIL PROTECTED] Subject: Re: [PHP-DB] query and display acting weird... Probably need: ORDER BY t.manufacturer, t.colourID

Re: [PHP-DB] query and display acting weird...

2003-07-25 Thread CPT John W. Holmes
Probably need: ORDER BY t.manufacturer, t.colourID ---John Holmes... - Original Message - From: "Aaron Wolski" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, July 25, 2003 2:58 PM Subject: [PHP-DB] query and display acting weird... > Hi Guys, >

[PHP-DB] query and display acting weird...

2003-07-25 Thread Aaron Wolski
Hi Guys, Code: echo "\n"; $query = "select t.manufacturer, t.id, t.colour, t.colourID, t.type, p.thread_index FROM kcs_threads t LEFT JOIN kcs_patternthreads p ON t.id = p.thread_index WHERE p.pattern_index = '$id' OR p.pattern_index IS NULL ORDER BY t.colourID"; $thread_manufacturer

RE: [PHP-DB] Query problem

2003-07-22 Thread jeffrey_n_Dyke
<[EMAIL PROTECTED]> .net.il> cc: Subject: RE: [PHP-DB] Query problem

RE: [PHP-DB] Query problem

2003-07-22 Thread Boaz Yahav
ssage- From: Ron Allen [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 22, 2003 11:29 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Query problem I have done this in the past, but for some reason it isn't working now (maybe a moron). I am trying to select all of the empty or NULL fields in

Re: [PHP-DB] Query problem

2003-07-22 Thread Ron Allen
How would the entire query look select * from ticket where Type = 'Phone' and ??? "Dirk Kredler" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Am Dienstag, 22. Juli 2003 11:29 schrieb Ron Allen: > > This is what I have > > select * from ticket where Type = 'Line' and Closeddate

RE: [PHP-DB] Query problem

2003-07-22 Thread Peter Lovatt
select * from ticket where Type = 'Line' and (Closeddate IS NULL OR Closeddate ='') or select * from ticket where Type = 'Line' and Closeddate IS NULL HTH Peter -Original Message- From: Ron Allen [mailto:[EMAIL PROTECTED] Sent: 22 July 2003 10:29 To: [EMA

Re: [PHP-DB] Query problem

2003-07-22 Thread Dirk Kredler
Am Dienstag, 22. Juli 2003 11:29 schrieb Ron Allen: > This is what I have > select * from ticket where Type = 'Line' and Closeddate = ' empty space' > and have tried the following > select * from ticket where Type = 'Line' and Closeddate = 'Null' > select * from ticket where Type = 'Line' and Close

[PHP-DB] Query problem

2003-07-22 Thread Ron Allen
I have done this in the past, but for some reason it isn't working now (maybe a moron). I am trying to select all of the empty or NULL fields in a column. This is what I have select * from ticket where Type = 'Line' and Closeddate = ' empty space' and have tried the following select * from ticket

[PHP-DB] Query fails after changing column name using Mascon

2003-07-03 Thread Dillon, John
When I change the name of a field the mysql query fails (using the new field name). It works if I change to an existing field. If I change that field name query doesn't work (having amended the query). Sounds like my table is not being updated to new field name, so query doesn't find the new fie

[PHP-DB] query (sub) select

2003-06-20 Thread OpenSource
Hey guys, I was wondering if this code is possible. I say it is a 4GL code that I am migrating to PHP. +++ $side1Query=ifx_query('select * from line, event' .' where line.e_id=event.e_id ' .' and l_type="'.$s_lt.'" ' .' and l_status in ("O

Re: [PHP-DB] query selection

2003-06-16 Thread CPT John W. Holmes
> the first list that is displayed has an ID for each product. But when I > click on it, it goes to the next page but does not display the rest of the > products that are listed in the second table. > > $query = "SELECT * FROM product_list WHERE productid = id"; > > Id being the description ID t

RE: [PHP-DB] query selection

2003-06-16 Thread Ryan Holowaychuk
n? Are you wanting us to write this for free? Do you want bids on the project? ---John Holmes... - Original Message - From: "Ryan Holowaychuk" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 16, 2003 2:30 PM Subject: [PHP-DB] query selection I have a dat

Re: [PHP-DB] query selection

2003-06-16 Thread CPT John W. Holmes
Okay... and? Do you have a question? Are you wanting us to write this for free? Do you want bids on the project? ---John Holmes... - Original Message - From: "Ryan Holowaychuk" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 16, 2003 2:30 PM S

[PHP-DB] query selection

2003-06-16 Thread Ryan Holowaychuk
I have a databae built, at the moment it has two tables. The first table has 2 fields, an ID and description. This is for a listing of all the different samples that we have at the company. When the user clicks on the description they want, it will open another page that will show all the item

Re: [PHP-DB] Query takes to much time

2003-06-04 Thread Robert Twitty
What database are you using? Also, are all the fields involved in the joins and whare clause properly indexed? Depending on the database you are using, it is possible to determine if the indexed fields are being used. -- bob On Tue, 3 Jun 2003, André Sannerholt wrote: > Hi everybody, > > now I

[PHP-DB] Query takes to much time

2003-06-04 Thread André Sannerholt
Hi everybody, now I have the following qery that still needs to much time: select distinct Anschriften.ID as aid, Anschriften.PLZ as aplz, Anschriften.STRASSE as astrasse, Anschriften.HNR as ahnr from Anschriften inner join Master on Anschriften.ID=Master.A inner join Master as m on Master.FN=m.F

Re: [PHP-DB] query string

2003-06-03 Thread Ian Fingold
Awsome! Thanks, That is exactly what I was looking for. Work great now! "Leif K-Brooks" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > To answer your question, you should urlencode() the team name. However, > I would store the user in a cookie or session, and fetch the team name

Re: [PHP-DB] query string

2003-06-02 Thread Leif K-Brooks
To answer your question, you should urlencode() the team name. However, I would store the user in a cookie or session, and fetch the team name on each page load. Otherwise, they can easily change which team they're using. Ian Fingold wrote: Sorry I don't think I explained very well... heres

Re: [PHP-DB] query string

2003-06-02 Thread Ronan Chilvers
Hi Ian Comments inline... On 01 Jun,2003 at 23:20 Ian Fingold wrote: > link will look like this > fant_stnd3.php?week=1&team=silly team > > but again, my problem is that it's cutting off the team value when there is > a space in the string.. > Don't allow spaces in the string ? Are we gett

Re: [PHP-DB] query string

2003-06-02 Thread Gürhan Özen
On Sun, 2003-06-01 at 23:20, Ian Fingold wrote: > Sorry I don't think I explained very well... heres my situation... > > I have a mysql database set up... I have a user table with 2 > fields..."team_name" and "fant_week". > > What I want to do is, depending on who is logged in, I want my link to

Re: [PHP-DB] query string

2003-06-02 Thread Becoming Digital
Check out http://www.php.net/manual/en/ref.url.php Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: "Ian Fingold" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, 01 June, 2003 23:20 Subject: Re: [PHP-DB] query string

Re: [PHP-DB] query string

2003-06-02 Thread Ian Fingold
Sorry I don't think I explained very well... heres my situation... I have a mysql database set up... I have a user table with 2 fields..."team_name" and "fant_week". What I want to do is, depending on who is logged in, I want my link to change the value of 'team' to the logged in members team nam

Re: [PHP-DB] query string

2003-06-02 Thread Gürhan Özen
On Sun, 2003-06-01 at 22:26, Ian Fingold wrote: > I'm trying to build a query string for one of my links.. for example... > fant_stnd3.php?week=1&team=fun%20team > > I need to be able to grab the values of 'week' and 'team' from an array, I > can do that no problem, but when the code runs it cuts

[PHP-DB] query string

2003-06-02 Thread Ian Fingold
I'm trying to build a query string for one of my links.. for example... fant_stnd3.php?week=1&team=fun%20team I need to be able to grab the values of 'week' and 'team' from an array, I can do that no problem, but when the code runs it cuts off the value if there is a space in the string. so instea

Re: [PHP-DB] query, INTERVAL problem

2003-06-01 Thread nabil
usually the mysql convert it to 2003-01-01 type without using this function... especially if it came from a form submission, am i right ? "Nabil" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > ok make it as > > $sql = "SELECT doc_id, exam_date FROM exams WHERE doc_id='$doc_id' and

Re: [PHP-DB] Query loop issues.

2003-05-30 Thread CPT John W. Holmes
> I'm having a problem with looping a query here is the skeleton of the code: > > $query_result = mysql_query("SELECT * FROM Boats WHERE Serial='$serial' OR > Make='$make'") > if(mysql_num_rows($query_result) > 1) > { > while($row = mysql_fetch_array($query_result, MYSQL_NUM)) > { > > } > } >

Re: [PHP-DB] Query loop issues.

2003-05-30 Thread Andrew D. Luebke
rick - Original Message - From: "Andrew D. Luebke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 29, 2003 11:48 AM Subject: [PHP-DB] Query loop issues. > I'm having a problem with looping a query here is the skeleton of the code: > > $query_

[PHP-DB] Query loop issues.

2003-05-30 Thread Andrew D. Luebke
I'm having a problem with looping a query here is the skeleton of the code: $query_result = mysql_query("SELECT * FROM Boats WHERE Serial='$serial' OR Make='$make'") if(mysql_num_rows($query_result) > 1) { while($row = mysql_fetch_array($query_result, MYSQL_NUM)) { } } else

[PHP-DB] query question

2003-03-25 Thread 2b4ever php
heyas all, the database: KID MID 1 1 1 2 2 2 I have the following code: $PID = 1; $UID = 2; $res = mysql_query("SELECT KID FROM kpr WHERE MID = '$PID' OR MID = '$UID'") or die (mysql_error()); $values = (array_values(mysql_fetch_array($res))); for ($i=; $i <= count($values);

RE: [PHP-DB] Query Help...

2003-03-10 Thread NIPP, SCOTT V (SBCSI)
: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Query Help... - Original Message - From: "NIPP, SCOTT V (SBCSI)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 10, 2003 9:23 AM Subject: [PHP-DB] Query Help... > I am having a lot of trouble with a query that

Re: [PHP-DB] Query Help...

2003-03-10 Thread Rob Bryant
- Original Message - From: "NIPP, SCOTT V (SBCSI)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 10, 2003 9:23 AM Subject: [PHP-DB] Query Help... > I am having a lot of trouble with a query that works fine from a > basic SQL command line

RE: [PHP-DB] Query Help...

2003-03-10 Thread George Pitcher
03 5:24 pm > To: '[EMAIL PROTECTED]' > Subject: [PHP-DB] Query Help... > > > I am having a lot of trouble with a query that works fine from a > basic SQL command line, but fails in my web script. Here is the > portion of > code including the query: > > my

[PHP-DB] Query Help...

2003-03-10 Thread NIPP, SCOTT V (SBCSI)
I am having a lot of trouble with a query that works fine from a basic SQL command line, but fails in my web script. Here is the portion of code including the query: mysql_select_db($database, $Prod); $query_groups = "SELECT name FROM group"; $groups = mysql_query($query_groups, $Prod) or

Re: [PHP-DB] query that finds when something is NOT IN a table

2003-03-06 Thread Paul Burney
on 3/6/03 4:59 PM, Katie Evans-Young at [EMAIL PROTECTED] appended the following bits to my mbox: > I need to only return a row from table1 if its id is not found in table2. > The query below is how I think it should work. However (as I had imagined), > this doesn't work. Syntax error (you can't p

[PHP-DB] query that finds when something is NOT IN a table

2003-03-06 Thread Katie Evans-Young
(Using MySQL and PHP) I need to only return a row from table1 if its id is not found in table2. The query below is how I think it should work. However (as I had imagined), this doesn't work. Syntax error (you can't put a select inside a select like that). SELECT table1.id FROM table1 WHERE table1

[PHP-DB] query

2003-02-19 Thread pei_world
$conn = new COM("ADODB.Connection"); $conn->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=$database"); $query = "SELECT * FROM user"; $result = $conn->Execute($query) or die("fail to connection to the database!"); if ($result->RecordCount()!=-1){ //do something } -- Sincerel

RE: [PHP-DB] QUERY question (group by) - please help

2003-01-10 Thread Matthew Moldvan
merce/ --- -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 2:07 PM To: 'Matthew Moldvan'; 'Damir Dezeljin'; PHP-db list Subject: RE: [PHP-DB] QUERY question (group by) - please help Just a side no

RE: [PHP-DB] QUERY question (group by) - please help

2003-01-10 Thread Hutchins, Richard
ility. > -Original Message- > From: Matthew Moldvan [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 10, 2003 1:57 PM > To: 'Damir Dezeljin'; PHP-db list > Subject: RE: [PHP-DB] QUERY question (group by) - please help > > > Try mysql_num_rows() ... > h

RE: [PHP-DB] QUERY question (group by) - please help

2003-01-10 Thread Matthew Moldvan
/ --- -Original Message- From: Damir Dezeljin [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 1:01 PM To: PHP-db list Subject: [PHP-DB] QUERY question (group by) - please help Hi. Maybe this isn't the correct list for asking the below question (if so sorry ;) ). I wa

[PHP-DB] QUERY question (group by) - please help

2003-01-10 Thread Damir Dezeljin
Hi. Maybe this isn't the correct list for asking the below question (if so sorry ;) ). I want to calculate how many rows my MySQL query which uses 'GROUP BY' returns. The query: SELECT FROM test WHERE (kid=1) OR (kid=2) OR (kid=4) GROUP BY cid,aid; Is it posible to get nu

RE: [PHP-DB] Query with optional params

2003-01-05 Thread Rich Hutchins
Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Query with optional params Rich, When I do searches with multiple fields, I construct the SQL string on the PHP side. You can do something like this: $sql = "SELECT * FROM docmeta WHERE "; if( $PartNumber ) $sql .= "Par

Re: [PHP-DB] Query with optional params

2003-01-05 Thread David Smith
Rich, When I do searches with multiple fields, I construct the SQL string on the PHP side. You can do something like this: $sql = "SELECT * FROM docmeta WHERE "; if( $PartNumber ) $sql .= "PartNumber='$PartNumber'"; if( $Title ) $sql .= " AND Title='$Title'"; and so on... That

[PHP-DB] Query with optional params

2003-01-05 Thread Rich Hutchins
I have a search page on which I place six fields into which users may enter data to perform a search. For ease of explanation, the fields are: Part Number Title Subtitle Print Date Status Type All of these fields reside in the same table, named docmeta, in a MySQL database. I'm running into a log

[PHP-DB] query results page ignores style sheet reference

2002-12-12 Thread chip . wiegand
I have a site I have to convert to frames (*ugh*) (so I'm using php frames, better than html frames anyway) and came up with a little problem. On one page is a list of states, click on the state name and get a list of dealers in that state. This works. What doesn't work is the list of dealers page

RE: [PHP-DB] query

2002-12-04 Thread Jason Vincent
th it. J -Original Message- From: Natividad Castro [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 04, 2002 9:35 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] query Hi to all, I'm working in a system where users can post projects. Other users will verify those projects. What I

[PHP-DB] query

2002-12-04 Thread Natividad Castro
Hi to all, I'm working in a system where users can post projects. Other users will verify those projects. What I'm trying to do is once a user verify a project he/she cannot view it anymore, but I want to keep it available for the other users that haven't verified it. I have two tables project and

Re: [PHP-DB] Query Executes in MySQL Command Line, Not From PHP.

2002-11-15 Thread Peter Beckman
Can you post the "explain levelone" here? One thought is that 1contentID is a char or varchar instead of an int. Then again, if it were, that exact code shouldn't have worked. Are you sure you are doing the query using $sql_element_low and not something else? You may be echoing it but are you a

RE: [PHP-DB] Query Executes ... SOLVED

2002-11-15 Thread Hutchins, Richard
ee of four). > -Original Message- > From: Hutchins, Richard [mailto:Richard.Hutchins@;GetingeCastle.com] > Sent: Friday, November 15, 2002 4:31 PM > To: 'Marco Tabini' > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP-DB] Query Executes in MySQL Command Line, Not F

RE: [PHP-DB] Query Executes in MySQL Command Line, Not From PHP.

2002-11-15 Thread Hutchins, Richard
This is so frustrating. > -Original Message- > From: Marco Tabini [mailto:marcot@;inicode.com] > Sent: Friday, November 15, 2002 4:14 PM > To: Hutchins, Richard > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP-DB] Query Executes in MySQL Command Line, Not From > PHP. >

RE: [PHP-DB] Query Executes in MySQL Command Line, Not From PHP.

2002-11-15 Thread Marco Tabini
query($sql_element_low) or die(mysql_error()); but it does not return an error. That's why I'm so baffled here. Everything SEEMS to be right. > -Original Message- > From: Marco Tabini [mailto:marcot@;inicode.com] > Sent: Friday, November 15, 2002 3:52 PM > To: Hutchins, Ri

RE: [PHP-DB] Query Executes in MySQL Command Line, Not From PHP.

2002-11-15 Thread Hutchins, Richard
d here. Everything SEEMS to be right. > -Original Message- > From: Marco Tabini [mailto:marcot@;inicode.com] > Sent: Friday, November 15, 2002 3:52 PM > To: Hutchins, Richard > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Query Executes in MySQL Command Line, Not From > P

Re: [PHP-DB] Query Executes in MySQL Command Line, Not From PHP.

2002-11-15 Thread Marco Tabini
I don't think you can have column names that start with a number. Are you sure you didn't mean to write: $sql_element_low = "UPDATE $table SET medialow=NULL WHERE ".$table."contentID=".$_POST["id"].""; Otherwise, try adding a simple die (mysql_error()); after the offending line and see what PH

[PHP-DB] Query Executes in MySQL Command Line, Not From PHP.

2002-11-15 Thread Hutchins, Richard
I'm having problems with a query. The query as it reads in my code is: $sql_element_low = "UPDATE $table SET medialow=NULL WHERE ".$_POST["tbl"]."contentID=".$_POST["id"].""; All of the varibles get passed as expected. I know this because if I echo the SQL out to the page, I get: UPDATE levelone

[PHP-DB] Query Help

2002-11-05 Thread Josh Johnson
I've implemented the scheme I briefly outlined in my last post (locking for data integrity), and now I'm writing queries to get totals from my logs, and I think I might be over-complicating things, and I'd like some alternative views on the subject. My "grandiose scheme" works like this: Problem:

RE: [PHP-DB] Query error

2002-10-02 Thread Beau Lebens
lts into 'x', 'y', 'z' format, then do something like "select author_code from author where author_code not in ($previousResults)" HTH Beau // -Original Message- // From: Wilmar Perez [mailto:[EMAIL PROTECTED]] // Sent: Wednesday, 2 Octo

Re: [PHP-DB] Query error

2002-10-02 Thread Jeffrey_N_Dyke
cc: Subject: [PHP-DB] Query error

[PHP-DB] Query error

2002-10-02 Thread Wilmar Perez
Hello guys Does anybody have a clue on what wrong with the following sentence? select author_code from author where author_code not in (select author_code from authorxcat); Thanks ***

<    1   2   3   4   >