Re: [PHP-DB] mysql query

2013-08-22 Thread Vinay Kannan
tware Engineer, Advanced Cloud Solutions, GTS > > > > IBM Senior Certified IT Specialist - L3 Thought Leader > > The Open Group Certified IT Specialist - L3 Distinguished > > Cloud, Java, PHP, BlackBerry, DB2 & Solaris Certified > > > > > > > &g

Re: [PHP-DB] mysql query

2013-08-22 Thread Michael Oki
, DB2 & Solaris Certified > > > > > > > Ethan Rosenberg wrote on 08/21/2013 > 11:59:19 PM: > > > From: Ethan Rosenberg > > To: Daniel Krook/White Plains/IBM@IBMUS > > Cc: PHP Database List > > Date: 08/21/2013 11:59 PM > > Subject: Re: [PHP-

Re: [PHP-DB] mysql query

2013-08-21 Thread Daniel Krook
> Date: 08/21/2013 11:59 PM > Subject: Re: [PHP-DB] mysql query > > On 08/21/2013 11:30 PM, Daniel Krook wrote: > Ethan, > > It's hard to tell from the code formatting in your email what the > exact problem might be, but a few reasons that this might fail in &

Re: [PHP-DB] mysql query

2013-08-21 Thread Daniel Krook
Ethan, It's hard to tell from the code formatting in your email what the exact problem might be, but a few reasons that this might fail in PHP rather than when sent to MySQL with hardcoded values: 1. var_dump/print_r $_POST to see what you're getting as input is what you expect (and sanitize!

Re: [PHP-DB] mysql query

2013-08-21 Thread Ethan Rosenberg
On 08/21/2013 07:52 PM, Toby Hart Dyke wrote: 1) What is the error message? 2) This has an error: >values ('$upc', $qnt,'$mnf','$itm', odrpt, 0, $stk) Missing '$' in front of 'odrpt'. Toby On 8/22/2013 12:48 AM, Ethan Rosenberg wrote: Dear List - I can't figure this out mysql> des

Re: [PHP-DB] mysql query

2013-08-21 Thread Toby Hart Dyke
1) What is the error message? 2) This has an error: >values ('$upc', $qnt,'$mnf','$itm', odrpt, 0, $stk) Missing '$' in front of 'odrpt'. Toby On 8/22/2013 12:48 AM, Ethan Rosenberg wrote: Dear List - I can't figure this out mysql> describe Inventory; +-+-+-

Re: [PHP-DB] Mysql query

2009-12-14 Thread ron . piggott
Chris I spent 3 hours debugging this query myself. I got as far as putting '' around 2009-12-25 to get the desired results. I just added the word DATE. It works, thanks. Chris I run a verse of the day e-mail list. This query determines the logic of the content (year round, Easter and Christma

Re: [PHP-DB] Mysql query

2009-12-14 Thread Chris
ron.pigg...@actsministries.org wrote: The query from my previous post was only part of a larger query. This is the entire query: SELECT GREATEST( IF( CURDATE( ) >= DATE_SUB( DATE( FROM_UNIXTIME( 1239508800 ) ) , INTERVAL LEAST( 14, ( SELECT COUNT( * ) FROM `verse_of_the_day_Bible_verses` WHERE

Re: [PHP-DB] mySQL query syntax error

2009-11-14 Thread Ron Piggott
I found the problem. The first subquery needed "AS" aliases. I am learning more of what mySQL is capable of and appreciate the help. Ron -Original Message- From: TG To: ron.pigg...@actsministries.org Subject: Re: [PHP-DB] mySQL query syntax error Date: Sat, 14 Nov 2009 07:1

RE: [PHP-DB] MySQL query executes outside of PHP, but not in PHP

2009-01-26 Thread Dave.McGovern
> error_log("Hey, the SQL is: $sql"); > > Then look in your php error log (you do have error logging enabled, > right?) [McGovern, Dave] Enabled, yes. Usefully enabled, no (correcting this helped a lot). > > If that SQL in the error log is fine, then your problem is > $client2->multi_query

Re: [PHP-DB] MySQL query executes outside of PHP, but not in PHP

2009-01-23 Thread Peter Beckman
On Fri, 23 Jan 2009, dave.mcgov...@sungard.com wrote: Hi, I am running: PHP 5.2.8, Apache 2.2.11, MySQL 5.1.30 on Win32/XP. I have a number of queries on my page which are very similar in structure, and they all work except for the following one. $mysql['process'] = $client2->real_escape_strin

Re: [PHP-DB] MySQL Query Timeout program in PHP

2008-10-31 Thread Thodoris
Man- when the query is fired through the web interface- it rans on mysql server max_execution_time - wont' help evn I stop apache itself... Yes it will. Apache will be instructed to stop execution of any script by the mod_php module (assuming you are using mod_php). But mysql process

Re: [PHP-DB] MySQL Query Timeout program in PHP

2008-10-15 Thread Chris
Piyush Kumar wrote: show full processlist ; gives me whole query -- but I want some php function -- like mysql_info() -- to return the PID of last run query Please do not email me directly. Always send to the mailing list. If it's not listed under php.net/mysql somewhere, then it's not availa

Re: [PHP-DB] MySQL Query Timeout program in PHP

2008-10-15 Thread Chris
Piyush Kumar wrote: Hi Chris, As I mentioned in my query I want to Kill only the query ran by web client not all queries running on the server. The perl script kill all queries - which are been running from for last 120(or any threshold set) Issues: How do I get the PID of my last select query

Re: [PHP-DB] MySQL Query Timeout program in PHP

2008-10-15 Thread Piyush Kumar
Man- when the query is fired through the web interface- it rans on mysql server max_execution_time - wont' help evn I stop apache itself... The query runs on mysql server - so I have to kill the PID on server itself... Thanks Piyush On Thu, Oct 16, 2008 at 7:57 AM, Jack van Zanen <[EMAIL PR

Re: [PHP-DB] MySQL Query Timeout program in PHP

2008-10-15 Thread Jack van Zanen
Just put the time out in your PHP.INI file max_execution_time = 30 ; Maximum execution time of each script, in seconds 2008/10/16 Piyush Kumar <[EMAIL PROTECTED]> > I'm using http://myclient.polarlava.com/ as web query interface for mysql > server > > Now I want to add "Query Timeout" functi

Re: [PHP-DB] MySQL Query Timeout program in PHP

2008-10-15 Thread Chris
Piyush Kumar wrote: I'm using http://myclient.polarlava.com/ as web query interface for mysql server Now I want to add "Query Timeout" functionality to it For that I need to get the PID for last ran mysql query and then using kill PID - I can kill the process on MySQL server Please explain how

RE: [PHP-DB] MySQL Query on the Fly

2007-05-14 Thread Dwight Altman
That's one of the uses of Ajax. http://www.xajaxproject.org/ http://wiki.xajaxproject.org/Tutorials:Learn_xajax_in_10_Minutes You don't "have to use an iframe". Regards, Dwight > -Original Message- > From: Todd A. Dorschner [mailto:[EMAIL PROTECTED] > Sent: Friday, May 11, 2007 8:31 AM

RE: [PHP-DB] MySQL Query

2005-11-19 Thread Bastien Koert
SELECT c.eventid, e.ID FROM col_links c left outer join calendar_v2 e ON c.eventid = e.ID where e.id is null LIMIT 0, 999; From: "Keith Spiller" <[EMAIL PROTECTED]> To: "[PHP-DB]" Subject: [PHP-DB] MySQL Query Date: Sat, 19 Nov 2005 19:29:25 -0700 Hi, I'm tring to run this query to find orph

RE: [PHP-DB] MySQL query result with some errors!

2005-10-11 Thread Bastien Koert
The code looks correct so my guess is that you are parsing it inorrectly in actionscript... Bastien From: Juan Stiller <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] MySQL query result with some errors! Date: Tue, 11 Oct 2005 18:14:42 -0300 (ART) Hi, Im trying to get a query

RE: [PHP-DB] mysql query plan

2005-04-13 Thread Bastien Koert
is there a join in the sql? Joins can be tricky since the order of the joins can determine the number of records selected from each table. If the joins result in a larger table joining with a smaller table, it could result in more than 30% of the rows being selected and the optimizer will ignore

RE: [PHP-DB] MySQL query problems...

2005-03-24 Thread NIPP, SCOTT V \(SBCSI\)
c.com -Original Message- From: J. Connolly [mailto:[EMAIL PROTECTED] Sent: Thursday, March 24, 2005 7:36 AM Cc: php-db@lists.php.net Subject: Re: [PHP-DB] MySQL query problems... yeah...errora are important. I do not escape my quotation marks in a query. I use single quotes within my inser

Re: [PHP-DB] MySQL query problems...

2005-03-24 Thread Bastien Koert
t;[EMAIL PROTECTED]> CC: php-db@lists.php.net Subject: Re: [PHP-DB] MySQL query problems... Date: Thu, 24 Mar 2005 08:35:56 -0500 yeah...errora are important. I do not escape my quotation marks in a query. I use single quotes within my insert and select statements. If it says "No va

Re: [PHP-DB] MySQL query problems...

2005-03-24 Thread J. Connolly
yeah...errora are important. I do not escape my quotation marks in a query. I use single quotes within my insert and select statements. If it says "No valis MySQL resource then you are returning 0 records which may be caused by escaping the quotations. I follow this pattern $sql ="INSERT INTO V

RE: [PHP-DB] MySQL query problems...

2005-03-23 Thread Bastien Koert
um, the errors might be helpful bastien From: "NIPP, SCOTT V (SBCSI)" <[EMAIL PROTECTED]> To: Subject: [PHP-DB] MySQL query problems... Date: Wed, 23 Mar 2005 17:18:44 -0600 I am getting errors for the following queries. This query seems to work fine in phpMyAdmin. $query2 = "SELECT AllMi

Re: [PHP-DB] MySQL - Query within a query

2005-03-19 Thread Larry E . Ullman
I am looking to do the following w/ MySQL and PHP. Have 1 query that gets results, then use those results in another query: $l = 2; $result1 = ("SELECT * FROM Drivers WHERE League = $l"); $result2 = mysql_query("SELECT DriverID, Driver, CarNbr FROM Drivers LEFT JOIN $LeagueList ON Drivers.Drive

RE: [PHP-DB] MySQL - Query within a query

2005-03-19 Thread Bastien Koert
Unlike ASP, $result1 is a handle to the dataset, not the data set itself. You need to access the data first and then incorporate that into your query like this: $l = 2; $result1 = ("SELECT * FROM Drivers WHERE League = $l"); $row = mysql_fetch_array($result1); $driverID = $row['DriverID']; $resu

Re: [PHP-DB] mysql query

2004-08-13 Thread Justin Patrin
On Fri, 13 Aug 2004 19:39:59 +0200, Torsten Roehr <[EMAIL PROTECTED]> wrote: > "Justin Patrin" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > On Fri, 13 Aug 2004 15:20:36 +0200, Quentin Cotillard > > <[EMAIL PROTECTED]> wrote: > > > Consider a table similar to the one below. > >

Re: [PHP-DB] mysql query

2004-08-13 Thread Torsten Roehr
"Justin Patrin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Fri, 13 Aug 2004 15:20:36 +0200, Quentin Cotillard > <[EMAIL PROTECTED]> wrote: > > Consider a table similar to the one below. > > What I want to do is to get ONE random record from categories(cat) A > > and 5 random r

Re: [PHP-DB] mysql query

2004-08-13 Thread Justin Patrin
On Fri, 13 Aug 2004 15:20:36 +0200, Quentin Cotillard <[EMAIL PROTECTED]> wrote: > Consider a table similar to the one below. > What I want to do is to get ONE random record from categories(cat) A > and 5 random record from category B > > | ID | computer | name | cat |... >1dell 834

Re: [PHP-DB] MySQL query, using DISTINCT...

2004-07-06 Thread Jason Wong
On Tuesday 06 July 2004 17:58, [EMAIL PROTECTED] wrote: > I have a system that tracks downloads, capturing loadsa info, but of > interest here, is email and filename. > Simply put, I wanna show all results where file name AND email are unique. > (so if email '[EMAIL PROTECTED]' has filename 'word.d

RE: [PHP-DB] MySql query

2004-03-17 Thread Ryan Jameson (USA)
simple <>< Ryan -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 10:15 AM To: Matt Matijevich Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySql query Yes, where evaluates to true. On Wed, 2004-03-17 at 12:03, Matt Matijev

Re: [PHP-DB] MySql query

2004-03-17 Thread Adam Voigt
Yes, where evaluates to true. On Wed, 2004-03-17 at 12:03, Matt Matijevich wrote: > This is probably a question for for a mysql list but I figured someone > out here knows the answer. > > I am working with an existing mysql application and there is a bunch of > queries that are formatted somethi

Re: [PHP-DB] MySql query

2004-03-17 Thread Matt Matijevich
SELECT * FROM sometable Just that :) (do I hear you slapping your forehead? :) Bruno Ferreira. Thanks for the answers guys. My problem was I am a mysql novice and there was a bunch of existing queries that use the "WHERE 1" syntax. -- PHP Database Mailing List (http://www.php.net/) To unsu

Re: [PHP-DB] MySql query

2004-03-17 Thread Bruno Ferreira
Matt Matijevich wrote: This is probably a question for for a mysql list but I figured someone out here knows the answer. [snip] SELECT * FROM sometable WHERE 1 SELECT * FROM sometable Just that :) (do I hear you slapping your forehead? :) Bruno Ferreira. --- [This E-mail scanned for viruses

Re: [PHP-DB] MySQL query... count?

2004-03-01 Thread Tristan . Pretty
> 01/03/2004 11:03 To [EMAIL PROTECTED] cc Subject Re: [PHP-DB] MySQL query... count? On Monday 01 March 2004 18:53, [EMAIL PROTECTED] wrote: > What I need to do for a new report, is say how many downloads were > recorded for each Business unit? > > I can select the Business uni

Re: [PHP-DB] MySQL query... count?

2004-03-01 Thread Jason Wong
On Monday 01 March 2004 18:53, [EMAIL PROTECTED] wrote: > What I need to do for a new report, is say how many downloads were > recorded for each Business unit? > > I can select the Business units using Distinct, but hhow can I then count > them? > I've tried: > SELECT DISTINCT(bu)buname, COUNT(bun

Re: [PHP-DB] MySQL Query not working via PHP

2003-10-18 Thread Sean Smitz
That solved the problem Steve. thanks, Sean "Steve Davies" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > remove the comma after cadet.photo, ie > > select cadet.relation2,cadet.photo FROM > > > HTH steve > > > Matthew Moldvan, Jr. wrote: > > >I would say try single qu

Re: [PHP-DB] MySQL Query not working via PHP

2003-10-18 Thread Steve Davies
remove the comma after cadet.photo, ie select cadet.relation2,cadet.photo FROM HTH steve Matthew Moldvan, Jr. wrote: I would say try single quotes instead of double quotes ... let me know if that works ... Regards, Matt. - Original Message - From: "Sean Smitz" <[EMAIL PROT

Re: [PHP-DB] MySQL Query not working via PHP

2003-10-17 Thread Matthew Moldvan, Jr.
I would say try single quotes instead of double quotes ... let me know if that works ... Regards, Matt. - Original Message - From: "Sean Smitz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 17, 2003 4:32 PM Subject: [PHP-DB] MySQL Query not working via PHP > I have

Re: [PHP-DB] MYSQL Query problem...

2003-09-21 Thread John W. Holmes
Ian Bert Tusil wrote: is there something wrong with my SQL Query? I didnt get any results neither errors.. [snip] mysql_query($SQLQuery,$link); That's because you're not checking for errors... mysql_query($SQLQuery,$link) or die(mysql_error()); -- ---John Holmes... Amazon Wishlist: www.amazon.co

Re: [PHP-DB] MYSQL Query problem...

2003-09-21 Thread Fedde van Feggelen
is there something wrong with my SQL Query? I didnt get any results neither errors.. $link = mysql_connect('localhost', '') or die('Cannot connect to the database.'); mysql_select_db("profiles",$link); $SQLQuery = "INSERT INTO profyles (username, fname, mname, lname, address, country, gender,

Re: [PHP-DB] MySQL query failing on apostrophe in data

2003-08-27 Thread jeffrey_n_Dyke
if you're using php to generate this query you could use addslashes() to the piece that is holding 11301201 0603A HKA 3902 #3708_JD's AE Exp. this will escape the slashes making them \' similarly if you're getting \' in your return values you can use stripslashes() www.php.net/addslashes www.p

Re: [PHP-DB] MySQL query failing on apostrophe in data

2003-08-27 Thread CPT John W. Holmes
From: "Dillon, John" <[EMAIL PROTECTED]> > How do I avoid the problem in the subject hereto? SELECT query uses > variable in the WHERE clause. Fails on the following query: > > SELECT Tbl.fld FROM Tbl WHERE Tbl.fld2='11301201 0603A HKA 3902 #3708_JD's > AE Exp' AND ... Escape the single quote w

RE: [PHP-DB] MySQL query failing on apostrophe in data

2003-08-27 Thread Andy Green
try putting a \ before the apostrophe -Original Message- From: Dillon, John [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 12:59 PM To: 'PHP-DB' Subject: [PHP-DB] MySQL query failing on apostrophe in data How do I avoid the problem in the subject hereto? SELECT query uses va

RE: [PHP-DB] MySQL query failing on apostrophe in data

2003-08-27 Thread Jennifer Goodie
> How do I avoid the problem in the subject hereto? SELECT query uses > variable in the WHERE clause. Fails on the following query: > > SELECT Tbl.fld FROM Tbl WHERE Tbl.fld2='11301201 0603A HKA 3902 #3708_JD's > AE Exp' AND ... Escape it. SELECT Tbl.fld FROM Tbl WHERE Tbl.fld2='11301201 0603A

RE: [PHP-DB] MySQL Query help please!

2003-03-12 Thread Griffiths, Daniel
Message- From: Mark [mailto:[EMAIL PROTECTED] Sent: 12 March 2003 15:36 To: Griffiths, Daniel Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL Query help please! I just set up a test db using your info, and the query you have worked ok. It provided a zero. Here's what I have (slightly mod

Re: [PHP-DB] MySQL Query help please!

2003-03-12 Thread Mark
I just set up a test db using your info, and the query you have worked ok. It provided a zero. Here's what I have (slightly modified from yours, but not appreciably). select ports.port, sum(stats.amount) as Total from ports left join stats on ports.port=stats.to_port group by ports.port order by T

RE: [PHP-DB] MySQL Query Question

2003-01-23 Thread John W. Holmes
> I need some help from you MySQL gurus out there. This is pure SQL by the > way..no front-end. > > > Lets say you have a table that has 2columns.columnA, > ColumnB and columnC > I have something like this Oh CRAP! You lost me... you said two columns but listed 3! ;) > if (columnA>'7', (c

Re: [PHP-DB] MySQL Query Question

2003-01-23 Thread Ignatius Reilly
It is safe to test if the divisor is zero: replace columnB/columnC by IF( columnC = 0, 0, columnB/columnC ) (the "0" could be anything else; this depends on your business logic) Ignatius - Original Message - From: "Jeremy" <[EMAIL PROTECTED]

Re: [PHP-DB] MySQL Query Question

2003-01-23 Thread Frank Peavy
Jeremy, This question probably should be posted to the MySql mailing list but here goes. Take a look at this link: http://www.mysql.com/doc/en/Where_optimisations.html Your example was not very explicit so I am not sure, but I believe you are in need of a WHERE clause. For example; Select a, b

Re: [PHP-DB] [mysql] query atomicity

2002-09-04 Thread :B nerdy
i am unfarmillar with InnoDB, i am currently using MyISAM i believe. just the default one. i am a complete noobie with InnoDB, do i have to convert my db? cheers "Andrey Hristov" <[EMAIL PROTECTED]> wrote in message 014d01c2540b$d309bf40$1601a8c0@andreywin">news:014d01c2540b$d309bf40$1601a8c0@

Re: [PHP-DB] [mysql] query atomicity

2002-09-04 Thread Andrey Hristov
Choices 1) Use InnoDB 2) If you cannot use innodb than you can write your code in the way you add in an array queries that will rollback the change : if you do $r1 = mysql_query('insert into some_table (k1,k2) values (4,2);'); $r1 = mysql_query('insert into some_table (k1,k2) values (5,3);'); yo

Re: [PHP-DB] MySQL Query Acting Up

2002-06-21 Thread William Fong
I would suggest using ' instead of " for SQL queries... That's what I use... so much easier. $query = "UPDATE articles2 SET title='$title', brief='$brief', doclink='$doclink' WHERE article_id='$id'"; Then I would print the query: print( "$query\n" ); Then if it still looks right, try m

Re: [PHP-DB] MySQL Query

2002-05-03 Thread Alnisa Allgood
At 1:01 PM +0100 5/3/02, CM wrote: >SELECT Periode.LibPeriode, PaysPeriode.RefPaysPeriode, >PaysPeriode.DateDebut,PaysPeriode.DateFin >FROM Periode, PaysPeriode, Pays >WHERE Pays.RefPays = PaysPeriode.Refpays >AND Periode.RefPeriode = PaysPeriode.RefPeriode >AND PaysPeriode.DateDebut > 20020207000

Re: [PHP-DB] MYSQL query help

2001-12-14 Thread Miles Thompson
It's not the IN, it's the sub-query you cannot use. MySQL doesn't support them and it's just about the main reason I don't like it. Alternatives? You could execute your subquery and return the results to an array. Loop through the array, using the index and the indexed element to drive a serie

Re: [PHP-DB] MySQL Query

2001-10-26 Thread Raquel Rice
On Sat, 27 Oct 2001 13:36:57 +1000 "Andrew Duck" <[EMAIL PROTECTED]> wrote: > Error > SQL-query : > > CREATE TABLE mail ( > from int(32) NOT NULL default '0', > to int(32) NOT NULL default '0', > subject varchar(80) NOT NULL default '', > message text NOT NULL > ) TYPE=MyISAM > > >

Re: [PHP-DB] mySQL Query and blank fields

2001-10-25 Thread Arpad Tamas
On Thursday 25 October 2001 15:08, Rick Emery wrote: > First, I wouldn't use length(), I'd use REGEXP: SELECT * FROM > foo_table WHERE fieldname REGEXP '..+' > It's quicker. regular expression is faster then a length() call? that's seems strange considering how complex a regexp can be with reg

RE: [PHP-DB] mySQL Query and blank fields

2001-10-25 Thread Rick Emery
ew_char') WHERE some_condition -Original Message- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 25, 2001 8:37 AM To: Php-DB Subject: RE: [PHP-DB] mySQL Query and blank fields I'd like to do it in mySQL, I think it will be done much quicker since it a large

RE: [PHP-DB] mySQL Query and blank fields

2001-10-25 Thread Niklas Lampén
I'd like to do it in mySQL, I think it will be done much quicker since it a large database. The type of the field is allready varchar. Niklas -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: 25. lokakuuta 2001 16:08 To: Php-DB Subject: RE: [PHP-DB] mySQL Quer

RE: [PHP-DB] mySQL Query and blank fields

2001-10-25 Thread Rick Emery
r can it be a CHAR string? -Original Message- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 25, 2001 8:04 AM To: Php-DB Subject: RE: [PHP-DB] mySQL Query and blank fields Thanks a lot! I quite didn't know what to look for in the manual. I actually have another

Re: [PHP-DB] mySQL Query and blank fields

2001-10-25 Thread Bas Jobsen
PROTECTED]> To: "Php-DB" <[EMAIL PROTECTED]> Sent: Thursday, October 25, 2001 3:03 PM Subject: RE: [PHP-DB] mySQL Query and blank fields Thanks a lot! I quite didn't know what to look for in the manual. I actually have another question: If I want to update several fields,

RE: [PHP-DB] mySQL Query and blank fields

2001-10-25 Thread Niklas Lampén
.." the value turns into '9881' not '98765' as I expected. Niklas -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: 25. lokakuuta 2001 15:56 To: Php-DB Subject: RE: [PHP-DB] mySQL Query and blank fields Change that to: SELECT * FROM foo_

RE: [PHP-DB] mySQL Query and blank fields

2001-10-25 Thread Rick Emery
Change that to: SELECT * FROM foo_table WHERE length(bar_field)>1; -Original Message- From: Tamas Arpad [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 25, 2001 8:01 AM To: Niklas Lampén; Php-DB Subject: Re: [PHP-DB] mySQL Query and blank fields On Thursday 25 October 2001 13

Re: [PHP-DB] mySQL Query and blank fields

2001-10-25 Thread Tamas Arpad
On Thursday 25 October 2001 13:16, Niklas Lampén wrote: > How can I query for specified fields that has to contain atleast 2 > charters? SELECT * FROM foo_table WHERE length(bar_field)>=1; Arpi > > Example: > Field AAA contains '' (NULL) => No match > Field BBB contains ' ' (one charter)

RE: [PHP-DB] mySQL Query and blank fields

2001-10-25 Thread Rick Emery
REGEXP '..+' -Original Message- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 25, 2001 6:17 AM To: Php-DB Subject: [PHP-DB] mySQL Query and blank fields How can I query for specified fields that has to contain atleast 2 charters? Example: Field AAA contains '

Re: [PHP-DB] mySQL Query and blank fields

2001-10-25 Thread Russ Michell
Assuming you're using MySQL - 35 seconds is all it took to find: http://www.mysql.com/doc/P/a/Pattern_matching.html Good luck! Russ. On Thu, 25 Oct 2001 14:16:40 +0300 =?iso-8859-1?Q?Niklas_Lamp=E9n?= <[EMAIL PROTECTED]> wrote: > How can I query for specified fields that has to contain atlea

RE: [PHP-DB] MySQL Query Weirdness

2001-09-21 Thread Rick Emery
[EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL Query Weirdness When you use mysql_fetch_array you're actually retrieving an array with two copies of the value you're looking for. One is indexed by the column number and one indexed by the column name. So it looks like you're lo

Re: [PHP-DB] MySQL Query Weirdness

2001-09-20 Thread Steve Cayford
When you use mysql_fetch_array you're actually retrieving an array with two copies of the value you're looking for. One is indexed by the column number and one indexed by the column name. So it looks like you're looping through them both and printing each out. You might want mysql_fetch_assoc

Re: [PHP-DB] mysql query problem

2001-07-26 Thread Paul Burney
on 7/26/01 11:11 AM, Steve Fitzgerald ([EMAIL PROTECTED]) wrote: > ran the query in the MySQL client and got the ERROR 1054: Unknown column > '$ContactID' in 'where clause'. I know the column ContactID exists. Of course it did. It can't find the text $ContactID in the table. Try putting in a

Re: [PHP-DB] mysql query problem

2001-07-26 Thread Steve Fitzgerald
ContactID is setup as a tinyint so I dropped the single ticks. No luck. I ran the query in the MySQL client and got the ERROR 1054: Unknown column '$ContactID' in 'where clause'. I know the column ContactID exists. Steve "Josh Hoover" <[EMAIL PROTECTED]> wrote in message E973048AB322D411AE9900

RE: [PHP-DB] mysql query problem

2001-07-26 Thread Hoover, Josh
In your query, do you need the single ticks around the $ContactID? Is the ContactID column a char/varchar field which would require the single ticks? I'm wondering if that's causing your problem. Also, what if you do that query via the MySQL client? What do you get then? Josh Hoover KnowledgeS