[PHP-DB] MySQL Regular expression

2003-10-09 Thread O Franssen
I'm not a 100% sure if this is the correct list for the following question, so I shall apologise beforehand if I upset any one. Now, I have a field in my database table in the following format: 100,30,443, etc. Representing prices for 52(53) weeks of the year and comma delimited. Now I need to

Re: [PHP-DB] MySQL Regular expression

2003-10-09 Thread Ignatius Reilly
... HTH Ignatius _ - Original Message - From: O Franssen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 09, 2003 1:49 PM Subject: [PHP-DB] MySQL Regular expression I'm not a 100% sure if this is the correct list for the following question, so I shall

Re: [PHP-DB] MySQL Regular expression

2003-10-09 Thread Rory McKinley
Subject: [PHP-DB] MySQL Regular expression I'm not a 100% sure if this is the correct list for the following question, so I shall apologise beforehand if I upset any one. Now, I have a field in my database table in the following format: 100,30,443, etc. Representing prices for 52(53) weeks

Re[2]: [PHP-DB] MySQL Regular expression

2003-10-09 Thread O Franssen
Actually in response to my previous comment, would the following achieve wwhat I want? ... and strcmp('$foot_budget', substring_index(substring_index(rates, ',', $selecteddate), ',', -1)) = -1 and strcmp('$head_budget', substring_index(substring_index(rates, ',', $selecteddate), ',', -1)) = 1

Re[2]: [PHP-DB] MySQL Regular expression

2003-10-09 Thread O Franssen
-- Regards, Owen Franssen Twisted Designmailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP-DB] MySQL Regular expression

2003-10-09 Thread O Franssen
This almost worked :p I applied your suggestion in the following way: select * from ihrproperties where region = 'Kerry' and 0 substring_index(substring_index(rates, ',', 41), ',', -1) 1568 But of course my prices are saved as text so is there a way to type cast the result of the

[PHP-DB] mySQL field structure question

2003-10-01 Thread Susan Ator
If I have a field in mySQL consisting of a number with 8 digits a decimal point and 4 more digits what is the field type it needs to be to sort it numerically? I've tried decimal(8,4) but it converts everything to .. I've also tried float but it doesn't sort numerically. All of the

Re: [PHP-DB] mySQL field structure question

2003-10-01 Thread CPT John W. Holmes
From: Susan Ator [EMAIL PROTECTED] If I have a field in mySQL consisting of a number with 8 digits a decimal point and 4 more digits what is the field type it needs to be to sort it numerically? I've tried decimal(8,4) but it converts everything to .. I've also tried float but

Re: [PHP-DB] mysql, finding the last record

2003-09-28 Thread Director General: NEFACOMP
Emery - Original Message - From: Joe Nilson Zegarra Galvez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 26, 2003 19:38 Subject: Re: [PHP-DB] mysql, finding the last record if you are seeking for the last in autoincrement field, in your select use this: select max(field

Re: [PHP-DB] mysql, finding the last record

2003-09-28 Thread Director General: NEFACOMP
though I am not an expert. Thanks Emery - Original Message - From: Joe Nilson Zegarra Galvez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 26, 2003 19:38 Subject: Re: [PHP-DB] mysql, finding the last record if you are seeking for the last in autoincrement field

[PHP-DB] mysql, finding the last record

2003-09-26 Thread John Ryan
is there any quick way of selecting the 'last' row in a mysql table?? i could write some messy code but id prefer an elegant solution. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] mysql, finding the last record

2003-09-26 Thread Jason Wong
On Saturday 27 September 2003 01:04, John Ryan wrote: is there any quick way of selecting the 'last' row in a mysql table?? i could write some messy code but id prefer an elegant solution. mysql_num_rows() mysql_data_seek() -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source

Re: [PHP-DB] mysql, finding the last record

2003-09-26 Thread Joe Nilson Zegarra Galvez
if you are seeking for the last in autoincrement field, in your select use this: select max(field) from table; if is other, well, i dont remember :D Regards Nilson John Ryan dijo: is there any quick way of selecting the 'last' row in a mysql table?? i could write some messy code but id

[PHP-DB] MySQL Very Slow Work.

2003-09-25 Thread äÒÕÞÉË ëÉÒÉÌÌ
I have php 4.3.2, Apache 2.0.46 and MySQL 4.* on Windows 2000 SP4. And i have problem. When i make query from php to MySQL. This work wery slow. Every query 4-5 sec. What i can make. Sorry for error, i know english wery bad. Please HELP ME! -- PHP Database Mailing List

Re: [PHP-DB] MySQL Very Slow Work.

2003-09-25 Thread George Patterson
On Sat, 20 Sep 2003 19:54:18 +0400 äÒÕÞÉË ëÉÒÉÌÌ [EMAIL PROTECTED] wrote: I have php 4.3.2, Apache 2.0.46 and MySQL 4.* on Windows 2000 SP4. And i have problem. When i make query from php to MySQL. This work wery slow. Every query 4-5 sec. What i can make. Sorry for error, i know english

[PHP-DB] mySQL vs pgSQL | php vs others

2003-09-24 Thread nabil
Dear all; I have been using Mysql for a long time, but I have a benchmark Q. Is pgsql , better ? faster ? more reliable than mysql ? any comment ? Some people say that php is not for a very big enterprise, banking , application !! they said that java or even .NET is better ... I m against that

Re: [PHP-DB] mySQL vs pgSQL | php vs others

2003-09-24 Thread Lester Caine
I have been using Mysql for a long time, but I have a benchmark Q. Is pgsql , better ? faster ? more reliable than mysql ? any comment ? I've only ever used Interbase and now Firebird. Latest release is due any day and is FAST. Some people say that php is not for a very big enterprise, banking ,

RE: [PHP-DB] mySQL vs pgSQL | php vs others

2003-09-24 Thread Gary . Every
El Mié 24 Sep 2003 07:24, nabil escribió: Dear all; I have been using Mysql for a long time, but I have a benchmark Q. Is pgsql , better ? faster ? more reliable than mysql ? Maybe not faster in FTS, but surely MORE reliable!!! any comment ? Some people say that php is not

Re: [PHP-DB] mySQL vs pgSQL | php vs others

2003-09-24 Thread Ignatius Reilly
: Re: [PHP-DB] mySQL vs pgSQL | php vs others El Mié 24 Sep 2003 07:24, nabil escribió: Dear all; I have been using Mysql for a long time, but I have a benchmark Q. Is pgsql , better ? faster ? more reliable than mysql ? Maybe not faster in FTS, but surely MORE reliable!!! any comment

[PHP-DB] mysql field not resolving comaparison condition for zip code locator

2003-09-23 Thread AdminHMO
I am having trouble implementing a zip code locator program. All of the functions work correctly but the $sql variable. The problem occurs by using the latitude argument as a comparison. The first latitude argument works but when the second latitude argument is added the query returns no data.

Re: [PHP-DB] mysql field not resolving comaparison condition for zip code locator

2003-09-23 Thread Peter Beckman
On Tue, 23 Sep 2003, AdminHMO wrote: I am having trouble implementing a zip code locator program. All of the functions work correctly but the $sql variable. Try putting the SQL in quotes: $sql = SELECT City FROM ZIPCodes WHERE Latitude = 122.02671343318 AND Latitude = 121.96888656682 AND

Re: [PHP-DB] mysql field not resolving comaparison condition for zip code locator

2003-09-23 Thread AdminHMO
Thanks for the suggestion but the quotes didn't make a difference I submitted the sql though php myadmin that takes care of the quote syntax Peter Beckman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tue, 23 Sep 2003, AdminHMO wrote: I am having trouble implementing a zip code

RE: [PHP-DB] mysql field not resolving comaparison condition for zip code locator

2003-09-23 Thread Jennifer Goodie
I am having trouble implementing a zip code locator program. All of the functions work correctly but the $sql variable. The problem occurs by using the latitude argument as a comparison. The first latitude argument works but when the second latitude argument is added the query returns no

Re: [PHP-DB] mysql field not resolving comaparison condition for zip code locator

2003-09-23 Thread AdminHMO
Thanks Jennifer, I got the query and the zipcode longitude and latitude from the developer of the zipcode locator. When I contacted them about this issue they had me run this query in the phpMyAdmin against the zipcode date and I still got no data returned. Jennifer Goodie [EMAIL PROTECTED]

Re: [PHP-DB] mysql field not resolving comaparison condition for zip code locator

2003-09-23 Thread Jim Hunter
= 37.508048715329; Jim ---Original Message--- From: AdminHMO Date: Tuesday, September 23, 2003 13:35:31 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] mysql field not resolving comaparison condition for zip code locator Thanks Jennifer, I got the query and the zipcode longitude and latitude

[PHP-DB] MySQL: How to properly extract fields from retrieved single record ???

2003-09-22 Thread -{ Rene Brehmer }-
Hi gang Still working on this DB for my gameclan not that it's essential what it's for... and be warned: Never worked with any form of DB in PHP before I began this project, so I'm a total n00b at these MySQL commands (and the manual for MySQL is by far nowhere near as good as the PHP

Re: [PHP-DB] MySQL: How to properly extract fields from retrieved single record ???

2003-09-22 Thread Peter Beckman
On Mon, 22 Sep 2003, -{ Rene Brehmer }- wrote: $result = mysql_query($query); replace with: $result = mysql_query($query) or die(MySQL Error: .mysql_error().\nbr/SQL: .$query); If the query fails, you will see why the query failed, and be able to view the query itself. Maybe

RE: [PHP-DB] MySQL: How to properly extract fields from retrieved single record ???

2003-09-22 Thread Jacob A. van Zanen
); } EXAMPLE -Original Message- From: -{ Rene Brehmer }- [mailto:[EMAIL PROTECTED] Sent: Monday, September 22, 2003 1:57 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] MySQL: How to properly extract fields from retrieved single record ??? Hi gang

Re: [PHP-DB] MySQL: How to properly extract fields from retrieved single record ???

2003-09-22 Thread Ignatius Reilly
PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 22, 2003 1:57 PM Subject: [PHP-DB] MySQL: How to properly extract fields from retrieved single record ??? Hi gang Still working on this DB for my gameclan not that it's essential what it's for... and be warned: Never worked with any form

Re: [PHP-DB] MySQL: How to properly extract fields from retrieved single record ???

2003-09-22 Thread George Patterson
On Mon, 22 Sep 2003 13:06:37 +0200 Ignatius Reilly [EMAIL PROTECTED] wrote: read the PHP manual and examples under the function mysql_fetch_array(). I find the MySQL manual is very well done and helpful. I've been using it as a reference for 2 years. Take a harder look! I think Ignatius

[PHP-DB] MYSQL Query problem...

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

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.. ?php $link = mysql_connect('localhost', 'username') or die('Cannot connect to the database.'); mysql_select_db(profiles,$link); $SQLQuery = INSERT INTO profyles (username, fname, mname, lname, address,

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:

[PHP-DB] MySQL depreciated mysql_list_* commands: Replacements?

2003-09-10 Thread Peter Beckman
So PHP is saying mysql_list_tables is depreciated. I replaced it with mysql_query(SHOW TABLES FROM DB) and everything is fine. Then mysql_list_fields didn't work right. So I submitted a bug (http://bugs.php.net/bug.php?id=25460) about it, and they said IT TOO was depreciated, which is fine.

Re: [PHP-DB] MySQL depreciated mysql_list_* commands: Replacements?

2003-09-10 Thread Micah Stevens
You have a couple of choices if I remember correctly.. For a table of name 'TBL': describe TBL; explain TBL; show columns from TBL; -Micah On Wed September 10 2003 12:08 pm, Peter Beckman wrote: So PHP is saying mysql_list_tables is depreciated. I replaced it with mysql_query(SHOW TABLES

Re: [PHP-DB] MySQL depreciated mysql_list_* commands: Replacements?

2003-09-10 Thread Peter Beckman
On Wed, 10 Sep 2003, Micah Stevens wrote: describe TBL; explain TBL; show columns from TBL; Yes, they do give the correct information. However, my question was is there a nice simple SQL command that will return exactly what mysql_list_fields (now depreciated) so that the $result can be

[PHP-DB] MYSQL Table Dump

2003-09-10 Thread John Ryan
Is there any way *from the command line* to get a dump of a mysql table and have it saved to a local file, instead of standard output -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] MYSQL Table Dump

2003-09-10 Thread jeffrey_n_Dyke
: 09/10/2003 04:23 Subject: [PHP-DB] MYSQL Table Dump PM

RE: [PHP-DB] MYSQL Table Dump

2003-09-10 Thread Jennifer Goodie
Is there any way *from the command line* to get a dump of a mysql table and have it saved to a local file, instead of standard output from running mysqldump --help -r, --result-file=... Direct output to a given file. This option should be used in MSDOS, because it

Re: [PHP-DB] MYSQL Table Dump

2003-09-10 Thread Parker Morse
On Wednesday, Sep 10, 2003, at 16:23 US/Eastern, John Ryan wrote: Is there any way *from the command line* to get a dump of a mysql table and have it saved to a local file, instead of standard output Have a look at man mysqldump, particularly the examples section. If you're already dumping the

Re: [PHP-DB] MySQL depreciated mysql_list_* commands: Replacements?

2003-09-10 Thread Micah Stevens
Now that I see code, I would say just run a 'SELECT * FROM table LIMIT 1' on your table, and run it through your code. That should give you what you want. -Micah On Wed September 10 2003 12:55 pm, Peter Beckman wrote: On Wed, 10 Sep 2003, Micah Stevens wrote: describe TBL; explain TBL;

Re: [PHP-DB] MYSQL Table Dump

2003-09-10 Thread John Almberg
] cc: 09/10/2003 04:23 Subject: [PHP-DB] MYSQL Table Dump

[PHP-DB] mySQL Binaries for Linux

2003-09-02 Thread John Ryan
I downloaded what I thought was Linux mySQL binaries, and the INSTALL file said there should be a bin directory when I untar, but there isnt! Just a BUILD folder and loads of make files. Did I download the wrong one? I downloaded mysql-standard-4.0.14-pc-linux-i686.tar.gz -- PHP Database

[PHP-DB] MySQL: CREATE TABLE, BLOB, UNIQUE, INDEX etc

2003-08-29 Thread Dillon, John
My code: $query= CREATE TABLE IF NOT EXISTS temp3 UNIQUE(CON175) IGNORE SELECT DISTINCT CONCAT($tbl2.this,$tbl2.that) AS CON175 FROM $tbl2 WHERE $tbl2.this='$rcc' ; gives error: Query failed: BLOB column 'CON175' used in key specification without a key length. Manual

Re: [PHP-DB] MySQL: CREATE TABLE, BLOB, UNIQUE, INDEX etc

2003-08-29 Thread Ignatius Reilly
_ - Original Message - From: Dillon, John [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Sent: Friday, August 29, 2003 5:06 PM Subject: [PHP-DB] MySQL: CREATE TABLE, BLOB, UNIQUE, INDEX etc My code: $query= CREATE TABLE IF NOT EXISTS temp3 UNIQUE(CON175) IGNORE SELECT

Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-28 Thread Ignatius Reilly
no quarrel with this behaviour. Ignatius _ - Original Message - From: Peter Beckman [EMAIL PROTECTED] To: Ignatius Reilly [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 4:13 PM Subject: Re: [PHP-DB] MySQL, PHP or ghost? On Wed, 27 Aug 2003

Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-28 Thread Martin Marques
El Mié 27 Ago 2003 11:34, Ignatius Reilly escribió: Hmmm... You have a point; the doc is not quite clear. Illegal YEAR values are converted to My understanding is that any illegal value will be first converted into '', then into the corresponding year inside the 1901-2155

Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-28 Thread Ignatius Reilly
, August 28, 2003 2:36 PM Subject: Re: [PHP-DB] MySQL, PHP or ghost? El Mié 27 Ago 2003 11:34, Ignatius Reilly escribió: Hmmm... You have a point; the doc is not quite clear. Illegal YEAR values are converted to My understanding is that any illegal value will be first converted

Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-28 Thread Martin Marques
El Jue 28 Ago 2003 11:25, Ignatius Reilly escribió: Well, it IS logical provided one is aware of the rules of the game, meaning, as you rightly point out, that MySQL does not reject SQL statements for incorrect values, but attempts at converting them at any price. I have no clue whether it is

Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-28 Thread Ignatius Reilly
28, 2003 9:37 PM Subject: Re: [PHP-DB] MySQL, PHP or ghost? El Jue 28 Ago 2003 11:25, Ignatius Reilly escribió: Well, it IS logical provided one is aware of the rules of the game, meaning, as you rightly point out, that MySQL does not reject SQL statements for incorrect values, but attempts

Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-28 Thread Martin Marques
El Jue 28 Ago 2003 17:20, Ignatius Reilly escribió: Well, you're certainly right (except I didn't get the meaning of 'FS' - anything obscene?). However: File System. 1. The job of this ML is to help people get things done 2. For criticisms concerning the design of MySQL, you may get better

[PHP-DB] MySQL, PHP or ghost?

2003-08-27 Thread Peter Beckman
Seems that either I don't understand mysql, or something. My table, with the non-important things removed... mysql explain plate; +-+---+--+-+-++ | Field | Type | Null | Key | Default

Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-27 Thread Ignatius Reilly
Read the MySQL manual. 0 value is interpreted as 2000. Your empty string is converted to an integer, thus 0. HTH Ignatius _ - Original Message - From: Peter Beckman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 3:39 AM Subject: [PHP-DB

Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-27 Thread David T-G
Peter -- ...and then Peter Beckman said... % % Seems that either I don't understand mysql, or something. Looks like it, though I admit that the manual doesn't adequately explain your results. Check out section 6.2.2.4 for details. % % My table, with the non-important things removed... ... %

Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-27 Thread Peter Beckman
On Wed, 27 Aug 2003, Ignatius Reilly wrote: Read the MySQL manual. Hmmm, I thought I did. 6.2.2.4: Illegal YEAR values are converted to . 0 value is interpreted as 2000. Your empty string is converted to an integer, thus 0. What confuses me (what I can't find) is why a quoted empty

RE: [PHP-DB] MySQL, PHP or ghost?

2003-08-27 Thread Griffiths, Daniel
to this year pass it NOW(). -Original Message- From: Peter Beckman [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 02:40 To: [EMAIL PROTECTED] Subject: [PHP-DB] MySQL, PHP or ghost? Seems that either I don't understand mysql, or something. My table, with the non-important things removed

Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-27 Thread Peter Beckman
On Wed, 27 Aug 2003, David T-G wrote: Looks like it, though I admit that the manual doesn't adequately explain your results. Check out section 6.2.2.4 for details. I did; see my previous (moments ago) email on my read on that manual section. % So my assumption is that if I insert with

Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-27 Thread David T-G
Peter, et al -- ...and then Peter Beckman said... % % On Wed, 27 Aug 2003, David T-G wrote: % % Looks like it, though I admit that the manual doesn't adequately explain % your results. Check out section 6.2.2.4 for details. % % I did; see my previous (moments ago) email on my read on that

Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-27 Thread Ruprecht Helms
Hi Peter Beckman, Seems that either I don't understand mysql, or something. My table, with the non-important things removed... mysql explain plate; +-+---+--+-+-++ | Field | Type |

RE: [PHP-DB] MySQL, PHP or ghost?

2003-08-27 Thread Griffiths, Daniel
:[EMAIL PROTECTED] Sent: 27 August 2003 15:29 To: Griffiths, Daniel Subject: RE: [PHP-DB] MySQL, PHP or ghost? On Wed, 27 Aug 2003, Griffiths, Daniel wrote: mysql will default to 2000 for a year value if you pass it as an entry because it will accept short values for the years this century, eg

Re: [PHP-DB] MySQL, PHP or ghost?

2003-08-27 Thread Peter Beckman
On Wed, 27 Aug 2003, Ruprecht Helms wrote: you have chosen a wrong format. The format for year is . With string the field years don't know what to do. Right -- and if it doesn't know what to do, why would it insert a value that isn't correct and not give me an error? It does give a

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

2003-08-27 Thread Dillon, John
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 ... John

RE: [PHP-DB] MySQL, PHP or ghost?

2003-08-27 Thread Hutchins, Richard
- From: Ignatius Reilly [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 9:31 AM To: Peter Beckman; [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL, PHP or ghost? Read the MySQL manual. 0 value is interpreted as 2000. Your empty string is converted to an integer, thus 0. HTH

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 HKA

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

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 with a

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

2003-08-27 Thread jeffrey_n_Dyke
: Subject: [PHP-DB] MySQL query failing on apostrophe in data 08/27/2003 12:59 PM

[PHP-DB] Mysql Query

2003-08-23 Thread Mohammad Saadullah
Hi guys, I have been working in php/oracle for quite some time now but recently had to shift myself to mysql and I am struggling with a particular query here. Scenario is, certain researchers can submit their proposals and those proposal are stored in a table researcher. proposals are of 2

[PHP-DB] MYSQL 4.1 derived tables and PHP

2003-08-22 Thread Jack van Zanen
Hi List, I have installed MYSQL 4.1 with support for derived tables. If I query Mysql with a query that has a subquery in the from clause it works fine. If I now load this query in PHP I get invalid resource error. If I change the select for another select w/o the subquery it works fine (So my

Re: [PHP-DB] MYSQL 4.1 derived tables and PHP

2003-08-22 Thread CPT John W. Holmes
From: Jack van Zanen [EMAIL PROTECTED] I have installed MYSQL 4.1 with support for derived tables. If I query Mysql with a query that has a subquery in the from clause it works fine. If I now load this query in PHP I get invalid resource error. If I change the select for another select w/o the

RE: [PHP-DB] MYSQL 4.1 derived tables and PHP

2003-08-22 Thread Jacob A. van Zanen
- From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Friday, August 22, 2003 4:11 PM To: Jack van Zanen Prive; [EMAIL PROTECTED] Subject: Re: [PHP-DB] MYSQL 4.1 derived tables and PHP From: Jack van Zanen [EMAIL PROTECTED] I have installed MYSQL 4.1 with support for derived tables. If I

[PHP-DB] mysql date select statement

2003-08-17 Thread Wendell Frohwein
Hello all, I have this page where I search and add up commissions in a mysql database. I want to select commissions between a certain date range. This is what im currently using but it does not seem to work. $from=20030101; $to=20031230; $search=mysql_query(SELECT SUM(amount) FROM

Re: [PHP-DB] mysql date select statement

2003-08-17 Thread John W. Holmes
Wendell Frohwein wrote: Hello all, I have this page where I search and add up commissions in a mysql database. I want to select commissions between a certain date range. This is what im currently using but it does not seem to work. $from=20030101; $to=20031230; $search=mysql_query(SELECT

Re: [PHP-DB] mysql date select statement

2003-08-17 Thread Shahmat Dahlan
hav u tried using dashes to denote which portion is the year, month, or day ? e.g. instead of 20030101, you'd probably want to use 2003-01-01. Wendell Frohwein wrote: Hello all, I have this page where I search and add up commissions in a mysql database. I want to select commissions between a

RE: [PHP-DB] MySQL Returns Error

2003-08-14 Thread Matt Schroebel
-Original Message- From: Jeff [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 3:52 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL Returns Error Oops, my mistake, it's not a blank entry - it re enters the last entry. I can hit F5 or click refresh 1000 times

Re: [PHP-DB] MySQL Returns Error

2003-08-14 Thread Jason Wong
On Wednesday 06 August 2003 01:14, Jeff wrote: Well I did what you said, and now I get Parse error: parse error, unexpected T_ECHO in C:\FoxServ\www\encana_db.php on line 44 Try: $result = mysql_query($query, $link_id) OR die(mysql_error()); -- Jason Wong - Gremlins Associates -

RE: [PHP-DB] MySQL Returns Error

2003-08-14 Thread Matt Schroebel
-Original Message- From: Jeff [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 3:15 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL Returns Error Every time I access or refresh the page, it adds one blank entry to the DB. Maybe I have the insert query

RE: [PHP-DB] MySQL and PHP?

2003-08-14 Thread Natividad Castro
posgreSQL -Original Message- From: Richard [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 1:49 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] MySQL and PHP? Hello I hope this is a rumour but I heard that MySQL is now fully GPL which it wasn't earlier. I think the part used

RE: [PHP-DB] MySQL Returns Error

2003-08-14 Thread Hutchins, Richard
:52 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL Returns Error Oops, my mistake, it's not a blank entry - it re enters the last entry. I can hit F5 or click refresh 1000 times and it will enter the last entry 1000 times. Jeff [EMAIL PROTECTED] wrote in message news

Re: [PHP-DB] mysql problem importing data

2003-08-14 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Hello Mark, I have tryed it by splitting the file into pices and then insert it with the help of phpmyadmin. This woked. however, I do have some more files to upload, and this seems to be not the fastest way:-) I tryed this:

Re: [PHP-DB] MySQL Returns Error

2003-08-14 Thread jeffrey_n_Dyke
] cc: Subject: Re: [PHP-DB] MySQL Returns Error

Re: [PHP-DB] MySQL Date insert

2003-08-14 Thread Budelak
: Monday, July 28, 2003 2:17 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] MySQL Date insert Hello, I have the following PHP code: $date = date(Y-m-d H:i:s); $result = mysql_query(INSERT INTO Boats (Make, Model, Serial, Stock, Extension, Cust_Name, Store, Date) VALUES

RE: [PHP-DB] mysql connect error

2003-08-14 Thread Peter Lovatt
should give you more information HTH, if not comeback to me Peter -Original Message- From: John Byrne [mailto:[EMAIL PROTECTED] Sent: 12 August 2003 08:06 To: [EMAIL PROTECTED] Subject: [PHP-DB] mysql connect error Hi, I've just started playing with Linux/MySQL/PHP - I come from

[PHP-DB] MySQL and PHP?

2003-08-14 Thread Richard
Hello I hope this is a rumour but I heard that MySQL is now fully GPL which it wasn't earlier. I think the part used to communicate with the mysql server was lgpl. Does this mean that when using php with mysql your php scripts have to be licensed under the gpl as well if released? If this is the

Re: [PHP-DB] mysql problem importing data

2003-08-14 Thread Mark
You could use mysqlimport with --fields-terminated-by=; or you could open it in something like Excel, parse it there (text to columns), and save it as a CSV or you could read it line by, line into PHP, explode each line on the ;, then insert the data into MySQL or you could write a

Re: [PHP-DB] MySQL Returns Error

2003-08-14 Thread Jeff
To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL Returns Error Every time I access or refresh the page, it adds one blank entry to the DB. Maybe I have the insert query in the wrong place? if ('POST' == $_SERVER['REQUEST_METHOD']) { //someone submitted the form with method=post // so validate input

Re: [PHP-DB] MySQL Returns Error

2003-08-14 Thread Jeff
- is there somewhere special I need to put that? Matt Schroebel [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -Original Message- From: Jeff [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 3:15 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL Returns Error

Re: [PHP-DB] MySQL Returns Error

2003-08-14 Thread Jeff
this. This is how I have handled it in the past though. -Original Message- From: Jeff [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 3:52 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL Returns Error Oops, my mistake, it's not a blank entry - it re enters the last

[PHP-DB] mysql connect error

2003-08-12 Thread John Byrne
Hi, I've just started playing with Linux/MySQL/PHP - I come from a Windows/ASP/PowerBuilder background. I have created a database in MySQL and now are trying to connect to it via PHP. I keep getting the same error, no matter what I specify in DSN. I always get: DB Error: no such database The

[PHP-DB] mysql problem importing data

2003-08-11 Thread Merlin
Hi there, I have a data file with data seperated by semicolons. It is about 8MB big. Now I just want to import it into mysql. I tryed several things. First I took phpmyadmin, which resulted in a white page without error msg. Then I tryed it by hand with load data. This did not work as well. No I

Re: [PHP-DB] MySQL Date insert

2003-08-10 Thread John W. Holmes
Budelak wrote: This is how I implemented a similar though not exactly the same problem: $tempdate = gmdate(d-m-Y); $insertSQL = sprintf(INSERT INTO gennews (newsdate, newsheadline, country, newsfull) VALUES ($tempdate, %s, %s, %s); So, you only have to change the format of the gmdate what you

RE: [PHP-DB] MySQL Returns Error

2003-08-10 Thread Matt Schroebel
-Original Message- From: Jeff [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 12:59 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] MySQL Returns Error Been working on this code all weekend, and I did take everyone's advice, but I'm still getting the same error. Error

RE: [PHP-DB] MySQL Returns Error

2003-08-05 Thread Aaron Wolski
] Subject: Re: [PHP-DB] MySQL Returns Error Ok, that worked, Now the error I'm getting is Duplicate entry ' ' for key 1 Is this a SQL table error? Here's my Table as entered: CREATE TABLE gradients ( gradient MEDIUMINT(10) DEFAULT '0' NOT NULL AUTO_INCREMENT, kwo VARCHAR(10) NOT NULL, lsd VARCHAR

[PHP-DB] MySQL Returns Error

2003-08-05 Thread Jeff
Hi... again. :P Been working on this code all weekend, and I did take everyone's advice, but I'm still getting the same error. Error retrieving records. From line $result = mysql_query($query, $link_id) OR DIE(Error retrieving records.); of my code. When I first put the insert query in, it

RE: [PHP-DB] MySQL Returns Error

2003-08-05 Thread Matt Schroebel
Change the gradient definition to: gradient MEDIUMINT(10) NOT NULL AUTO_INCREMENT, -Original Message- From: Jeff [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 1:44 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL Returns Error Ok, that worked, Now the error

Re: [PHP-DB] MySQL Returns Error

2003-08-05 Thread Jeff
Ok, that worked, Now the error I'm getting is Duplicate entry ' ' for key 1 Is this a SQL table error? Here's my Table as entered: CREATE TABLE gradients ( gradient MEDIUMINT(10) DEFAULT '0' NOT NULL AUTO_INCREMENT, kwo VARCHAR(10) NOT NULL, lsd VARCHAR(10) NOT NULL, date DATE DEFAULT

Re: [PHP-DB] mySQL help on win xp

2003-08-01 Thread Robin Baxter
I am running PHP with Abyss Webserver on Windows XP Home, and MySQL works OK. If I am not using the mysql console, I use PHPMyAdmin as a friendlier front end for MySQL. Rob Larry R. Sieting [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] At 07:44 PM 7/31/2003 +0100, John Ryan wrote:

[PHP-DB] MySQL

2003-08-01 Thread Crash
Hi! I just need to know how to enter the data submitted by an html form into a MySQL DB. I have already created the form, and the variables in that form - just need to know the query use to insert that data. Thanks - Crash -- PHP Database Mailing List (http://www.php.net/) To

Re: [PHP-DB] MySQL

2003-08-01 Thread Larry E . Ullman
I just need to know how to enter the data submitted by an html form into a MySQL DB. I have already created the form, and the variables in that form - just need to know the query use to insert that data. The query will be something like INSERT INTO tablename (column1, column2, column3, ...)

Re: [PHP-DB] MySQL

2003-08-01 Thread Jason Wong
On Saturday 02 August 2003 01:46, Jeff wrote: I tried doing this through the news server, but something messed up. I just need to know how to make an HTML form write to a MySQL DB. This is what I have so far. [snip] And does it work? If it works then congratulations. If it doesn't work,

<    2   3   4   5   6   7   8   9   10   11   >