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
...
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
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
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
--
Regards,
Owen Franssen
Twisted Designmailto:[EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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
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
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
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
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
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
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
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
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
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
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
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 ,
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
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
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.
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
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
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
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]
= 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
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
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
);
}
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
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
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
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,
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,
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:
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.
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
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
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
:
09/10/2003 04:23 Subject: [PHP-DB] MYSQL Table Dump
PM
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
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
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;
]
cc:
09/10/2003 04:23 Subject: [PHP-DB] MYSQL Table Dump
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
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
_
- 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
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
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
, 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
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
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
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
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
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
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...
...
%
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
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
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
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
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 |
:[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
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
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
-
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
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
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
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
:
Subject: [PHP-DB] MySQL query failing
on apostrophe in data
08/27/2003 12:59
PM
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
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
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
-
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
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
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
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
-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
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 -
-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
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
: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
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:
]
cc:
Subject: Re: [PHP-DB] MySQL Returns
Error
: 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
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
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
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
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
- 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
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
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
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
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
-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
]
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
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
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
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
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:
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
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, ...)
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,
601 - 700 of 1362 matches
Mail list logo