SELECT DISTINCT Colour
FROM tablename
Peter
On 14/02/2008, Richard [EMAIL PROTECTED] wrote:
Hello,
I don't know if it is possible to do this with mysql alone ...
Here goes :
I've got a database list which is like to following :
Num | Name| Colour
Hi
You probably cant make it 100% secure, because php is not a fully compiled
language, and as such an expert techie could probably add extra code to your
app that wouild allow access to the database, BUT you can get pretty close.
You will need to encrypt everything in the database using MySql
Hi
We have tables of 1.5M rows 25 fields, in heavy use with frequent inserts
and updates on a P4 with 1GB of RAM. Performance is fine, and the table size
is 400MB, so you should not have any problems.
Peter
On 29/05/06, Chris W [EMAIL PROTECTED] wrote:
Harish TM wrote:
hi...
I need
hi
you are not passing a password to mysql - check your code to see if this is
correct.
Peter
-Original Message-
From: Christian Biggins [mailto:[EMAIL PROTECTED]
Sent: 26 January 2005 12:27
To: mysql@lists.mysql.com
Subject: Access denied for user - I cant work this out
Hi All,
');
}
}
HTH
Peter
-Original Message-
From: Christian Biggins [mailto:[EMAIL PROTECTED]
Sent: 26 January 2005 13:30
To: 'Peter Lovatt'; mysql@lists.mysql.com
Subject: RE: Access denied for user - I cant work this out
Hi Peter,
There is a password being suppled - see code (btw
Hi
there a are a couple of things that I have found cause occasional lock ups.
running out of temp space - MySql builds temp files on bigger queries and if
it runs out of temp disk space it grinds to a halt, which causes all the
following queries to queue up until max_connections is exceeded.
Hi
What about encrypting the data using a password that is specific to the
user. That way only those that know the password for that row can access it.
Locking is really to stop two users editing the same record at the same
time, rather than controlling access.
HTH
Peter
-Original
: 18 November 2004 10:19
To: 'Peter Lovatt'; 'Mysql (E-mail)'
Subject: RE: Row level security requirements, can I still use MySQL?
Yeah you are correct locking is something else I actually meant was
restricted access.
If I understand you correctly I would then encrypt all information
= g.groupID
someone with root access to the database and access to the software
sourcecode would still be able to gain access, but it is an extra layer of
security.
Peter
-Original Message-
From: Jonas Ladenfors [mailto:[EMAIL PROTECTED]
Sent: 18 November 2004 12:36
To: 'Peter Lovatt
5001
Peter
-Original Message-
From: Robinson, Eric [mailto:[EMAIL PROTECTED]
Sent: 18 November 2004 21:35
To: [EMAIL PROTECTED]
Subject: Auto-Increment Starting Point? (Multimaster Replication
Question)
When you set a field to auto-increment, can you tell it where to start?
Virus!
Monty's address was probably spoofed
Peter
-Original Message-
From: Spenser [mailto:[EMAIL PROTECTED]
Sent: 16 November 2004 08:32
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Returned mail: Data format error
Did the system just reject Monty Widenius'
Hi
sub selects are only supported from MySql 4.1 onwards, so it may be invalid
if you have an earlier version.
you may also cause a conflict by using the database alias (t1) as the name
of the result
Peter
-Original Message-
From: kalin mintchev [mailto:[EMAIL PROTECTED]
Sent: 14
hi
you might want to look at TIMESTAMP which does it all for you.
Peter
-Original Message-
From: Robert Adkins [mailto:[EMAIL PROTECTED]
Sent: 15 October 2004 20:23
To: MySQL General List
Subject: Command that I believe should work...
...but doesn't.
I am attempting to
Hi
could it be that the - or a space is upsetting things?
111-111- might be calculated to give -
or if the user enters a space it is no longer an integer
unless you need it to be an integer, telephone numbers are usually stored
as a char type
HTH
Peter
-Original Message-
try
INSERT INTO other_table
( field1, field2, etc)
SELECT SQL_CALC_FOUND_ROWS *
FROM wow.resume r
INNER JOIN wow.candidate c
WHERE r.Section_ID = '1'
AND MATCH (r.Section_Value)
AGAINST ('+BAAN' IN BOOLEAN MODE)
AND c.Candidate_ID = r.Candidate_ID
Peter
-Original Message-
From: Eve
Hi
We have a machine with 2 IP addresses and mysql 3.23 on one and 4.10 on the
other. Both using port 3306
One instance listens on localhost, which maps to 127.0.0.1, and also on one
of the public IP addreses and the other listens to the other IP address.
I use the IP address in the connection
Hi
Just my two pence worth. Its not tested or scientific, and is based on gut
feeling and experience.
Connecting to mysql is resource intensive, particularly if you make a fresh
connection for each query. A query will almost certainly involve disk acces
which is slow. Sending the result of the
Hi
the usual syntax is mysql -u root -p
if that does not work look into
skip grant tables option
http://dev.mysql.com/doc/mysql/en/Resetting_permissions.html
HTH
Peter
-Original Message-
From: DBS [mailto:[EMAIL PROTECTED]
Sent: 23 August 2004 03:50
To: [EMAIL PROTECTED]
Hi
you try setting the column type to TIMESTAMP :)
http://dev.mysql.com/doc/mysql/en/DATETIME.html
Peter
-Original Message-
From: Stuart Felenstein [mailto:[EMAIL PROTECTED]
Sent: 19 August 2004 17:50
To: [EMAIL PROTECTED]
Subject: Fairly lame question
I think this can be
SELECT * FROM mytable ORDER BY alphabetical_field
hth
Peter
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 14 August 2004 08:57
To: [EMAIL PROTECTED]
Subject: MYSQL RECORDS AND ALPHABETICAL ORDER
Dear Friends,
I have mysql table which retains
HI
MD5 would be a good way of doing it. Just add a column to your user table
and
UPDATE users SET subscribed = 0 WHERE encryptedID = md5 hash here
HTH
Peter
-Original Message-
From: Scott Haneda [mailto:[EMAIL PROTECTED]
Sent: 04 August 2004 03:37
To: MySql
Subject: Best
hi
the
/home/lark/public_html/connection.php on line 23
just refers to the file within the context of the whole file system and is
fine
the rest says that mysql cannot/does not execute the query so there is no
result to use.
the @ suppresses error messages so it may be best to remove it
try
hi
the error is because you have more or fewer items of data than fields or
columns to put it in
it is better practice to include fields in your query
INSERT INTO sometable
(
field1
, field2
, field3
)
VALUES
Hi
There are two aspects to dates, and your questions include parts of both.
When MySql stores dates you have a choice of column types
http://dev.mysql.com/doc/mysql/en/DATETIME.html
has the details
If you just need to store dates then the DATE type will suit your needs. You
just specify it
- Plain English Please
--- Peter Lovatt [EMAIL PROTECTED] wrote:
Hi
There are two aspects to dates, and your questions
include parts of both.
When MySql stores dates you have a choice of column
types
http://dev.mysql.com/doc/mysql/en/DATETIME.html
has the details
Big tables, a join and a LIKE on middleweight hardware - looks about right
to me.
Peter
-Original Message-
From: Kyle Renfro [mailto:[EMAIL PROTECTED]
Sent: 27 March 2004 00:48
To: [EMAIL PROTECTED]
Subject: 6.5 seconds seems slow for the following search?
I am testing MySQL as a
select
db1.table.field, db2.table.field
where
db1.table.someotherfield = db2.table.someotherfield
Peter
-Original Message-
From: Ed Reed [mailto:[EMAIL PROTECTED]
Sent: 24 March 2004 23:45
To: [EMAIL PROTECTED]
Subject: Query across two databases on the same server
Is there
Hi
To use phpMyAdmin you need a webserver and php installed - the code suggests
you either are not running through a webserver or that it is not configured
for php.
If you are not developing for php you might take a look at windows front
ends for mysql - search the list for recommendations
HTH
no .they really are out to get you :)
Security is always a challenge. You can build the most secure system in the
world but if the users are not educated in security you have wasted your
time.
The no password relies on a user knowing what to do. The question is this
OK default behaviour -
Hi
You can only connect as root from localhost for security I think.
If you want to connect from elsewhere create a new user and use that - look
for GRANT on www.mysql.com
Peter
-Original Message-
From: Duke, Brian [mailto:[EMAIL PROTECTED]
Sent: 08 February 2004 01:50
To: [EMAIL
hi
it is very simple in php
$query = 'SELECT *
FROM table
WHERE somefield = '.$somevalue.'
ORDER BY somefield
';
$mysql_result = mysql_query($query, $mysql_link);
while($row = mysql_fetch_array($mysql_result))
{
$output .=
SELECT *
From articles
WHERE SectionID=1
ORDER BY EntryDate DESC
LIMIT 1,10
the where clause should be after the table name
HTH
Peter
-Original Message-
From: Ian O'Rourke [mailto:[EMAIL PROTECTED]
Sent: 18 January 2004 11:22
To: [EMAIL PROTECTED]
Subject: SQL Query
Any idea what
phpMyAdmin will do it.
http://www.phpmyadmin.net/
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 14 January 2004 01:15
To: [EMAIL PROTECTED]
Subject: Looking for a tool
Importance: High
Several years ago, I used a cgi based tool that allowed me to upload
Hi
We have been running MySql since 1998 and have never had any data corruption
We have servers running millions of queries a day and they are bullet proof.
Hi,
I'm trying to get a software designer to write us some software using
MySQL as the database server (he currently requires MS
try adding an error report after the query
$result = mysql_query( select * from domains ) or die (mysql_error());
the rest looks OK
Peter
-Original Message-
From: Trevor Rhodes [mailto:[EMAIL PROTECTED]
Sent: 17 December 2003 22:26
To: [EMAIL PROTECTED]
Subject: Basic error
Hello
Try
Insert INTO `table` ( `inc_field` ) values (10)
the auto inc field will then generate the next sequential numbers
HTH
Peter
-Original Message-
From: Graham Little [mailto:[EMAIL PROTECTED]
Sent: 15 December 2003 14:01
To: '[EMAIL PROTECTED]'
Subject: SEQUENCES
I was
Hi
try running
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER
ON database.*
TO [EMAIL PROTECTED]
IDENTIFIED BY 'pass';
where 'hostname' is the one in the error message
HTH
Peter
-Original Message-
From: Louis van der Merwe [mailto:[EMAIL
Hi
try DEZIGN FOR DATABASES
http://www.datanamic.com/
hth
Peter
-Original Message-
From: Alaios [mailto:[EMAIL PROTECTED]
Sent: 30 November 2003 20:27
To: [EMAIL PROTECTED]
Subject: designer
Do u know any programme that can degin databases in order to design before i
implement them?
Hi
php
http://www.php.net
would be a good start.
Peter
-Original Message-
From: S Kusumo [mailto:[EMAIL PROTECTED]
Sent: 24 November 2003 12:09
To: [EMAIL PROTECTED]
Subject: programming language
Hello ..
I'm a CLIPPER programmer. I'm looking for programming language (like
Clipper)
Have you checked permissions - the files should be owned by mysql
Peter
-Original Message-
From: DePhillips, Michael P [mailto:[EMAIL PROTECTED]
Sent: 12 November 2003 21:38
To: [EMAIL PROTECTED]
Subject: new install failure
HI list
When installing mysql 4.16 on debian linux
Hi
We have a similar challenge. Offsite backups with huge amounts of data,
without spending a fortune.
We have a local Linux box and the remote server both running rsync.
http://samba.anu.edu.au/rsync/
Rsync is brilliant because it only updates file sectors that have changed.
We would only use
---
-Original Message-
From: Steve Vernon [mailto:[EMAIL PROTECTED]
Sent: 31 October 2003 14:19
To: Peter Lovatt; Mysql List
Subject: Re: Hardware Raid and 2 Gig Limit
Hiya!
Thanks for the help!!!
Do RSync like big files? Or does it prefer smaller
Hi
Install MyODBC
Set it up for your mysql database
then from Paradox copy table to the mysql datasource.
You should get a correctly structured table. Depending on the fieldtypes you
may have to do a little manual tweaking.
You may also not be able to do memo fields.
MyODBC can be used as a
Hi
When you set up the mysql user use a GRANT statement that only gives SELECT
access. That is effectivly read only access for that user
Peter
-Original Message-
From: Mark Swanson [mailto:[EMAIL PROTECTED]
Sent: 02 September 2003 01:34
To: [EMAIL PROTECTED]
Subject: [q] can I start
HI
from the command line run
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER
ON database_name.*
TO [EMAIL PROTECTED]
IDENTIFIED BY 'password';
(you may want to give more restrictive privileges)
that should fix it - you don't have privileges set for the
Hi
Firstly if your application is well designed then your data should not be accessible
by the wrong users - if you make sure that there is no way the wrong supplier id can
be allocated - put an extra 'are you sure this is correct' check, make it so that the
user id can only be allocated once
SELECT * FROM TABLE
if( mysql_num_rows() == 0) table is empty
HTH
Peter
-Original Message-
From: D. K. [mailto:[EMAIL PROTECTED]
Sent: 29 July 2003 08:12
To: [EMAIL PROTECTED]
Subject: no subject
Hello List;
I am developing a php-mysql application for my term project at school and
you need at least 3 fields
CategoryID
ParentID
Name
CategoryID is the key, and identifies the category
ParentID is the CategoryID of the parent category
Name is the category name
When you add a sub category you set its ParentID to the CategoryID
To show all sub categories of CategoryID 99
search for
my.cnf
If it does not exist you can create it,
http://www.mysql.com/doc/en/Option_files.html
Peter
-Original Message-
From: Richard Sumilang [mailto:[EMAIL PROTECTED]
Sent: 22 July 2003 07:56
To: [EMAIL PROTECTED]
Subject: Setting max_connections
Where do I go to set
2) Using the Opera browser, I open my pages and it sends variables through
?var1=value1var2=value2 perfectly until I tried using a form and
realised I am not getting anything back from $PHPSELF...
try $PHP_SELF
Peter
--
http://www.dragonstalon.co.uk/
Latest news at
Hi
when you log in to MySQL use
mysql -u root
you will then be asked to enter a password. On a new instalation the
password may be blank - nothing
After that you should be able to create databases.
You might find information about privilages and GRANT usefull
Hi
You could achive what you want using grant statements, but you still need a
user interface to send queries to the database and display the information
sent back in a way that is manageble for non techies.
There are many ways of building user interfaces, php ( http://www.php.net )
is probably
Hi
did you run mysql_install_db ? This sets up the mysql database and initial
privilages
Peter
-Original Message-
From: Blake Howe [mailto:[EMAIL PROTECTED]
Sent: 29 June 2003 19:27
To: [EMAIL PROTECTED]
Subject: mysql server wont start
OK i am having problems starting the mysql
You could try
SOUNDEX(str)
http://www.mysql.com/doc/en/String_functions.html
which might do what you are looking for
HTH
Peter
-Original Message-
From: Tom Johnson [mailto:[EMAIL PROTECTED]
Sent: 26 June 2003 14:23
To: [EMAIL PROTECTED]
Subject: Need your help in a search query
Hi
If you log into MySQL on the command line and enter
mysqlSHOW PROCESSLIST ;
this should show you what is running. You may find a runaway query.
also check the temp disk space while the system is stalling - large joins
can use huge amounts of disk space. If MySql runs out of disk space it
Hi
I agree the SCO action sucks but Open source software should be just that -
open to all, let the courts decide, if it ever gets that far!.
Peter
-Original Message-
From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]
Sent: 26 June 2003 01:18
To: Daevid Vincent
Cc: [EMAIL PROTECTED]
Hi
You need nothing or backtics - ` - around the table name - you have quotes
INSERT INTO products VALUES (153328, 2, '181150', 'noimage.gif', '154.1000',
'2003-06-20 23:03:00', NULL, '-00-00 00:00:00', '0.00', 1, 1, 1, 0);
also better to state the field names - if you add or remove a field
Hi
SELECT
COUNT(DISTINCT trEmail ) as clicks
, trEmail FROM table
GROUP BY trEmail
ORDER BY clicks DESC
will probably give what you are looking for
Peter
-Original Message-
From: Tim Thorburn [mailto:[EMAIL PROTECTED]
Sent: 15 June 2003 00:14
To: [EMAIL
Hi
I would echo that support is probably the most important aspect of your
choice.
Unless you have a particularly technically demanding application that needs
features only found in Postgres you would be best with MySql
You can get an answer to most support questions via this list, or MySql
Hi
can you post the form/php code
Peter
-Original Message-
From: Steve Marquez [mailto:[EMAIL PROTECTED]
Sent: 10 June 2003 14:26
To: MySQL List
Subject: Column or Table issue
I am attempting to insert an article into a MySQL table on a remote server,
via a PHP Forms script.
I am
smaller userbase and no commercial support *combined* mean fewer sources of
support. With MySql, support from this *superb* MySQL list :) and MySql AB
is likely to be better than Postgres support.
Open source support (free or paid for) in general seems to be better than
closed source equivalents
-Original Message-
From: Christian Calloway [mailto:[EMAIL PROTECTED]
Sent: 05 June 2003 18:32
To: [EMAIL PROTECTED]
Subject: RE: update statement, error free but no affected rows?
update students
set
counselor_id = 1 ,
school_attending='Univsity of Maryland'
where id = 1;
I think
?php
if($row_Recordset1['imagecolumn']) echo 'img
src='.$row_Recordset1[imagecolumn].'';
?
Peter
-Original Message-
From: Becoming Digital [mailto:[EMAIL PROTECTED]
Sent: 03 June 2003 20:57
To: [EMAIL PROTECTED]
Subject: Re: Mysql / PHP image link problem.
FWIW, there is a PHP-DB
Hi
This is a bug. You can fix it by adding a line to my.cnf. Can't remember
what but search the archives as it has appeared before.
Peter
-Original Message-
From: Nick Arnett [mailto:[EMAIL PROTECTED]
Sent: 01 June 2003 15:54
To: [EMAIL PROTECTED]
Subject: RE: MYSQL DB PROBLEM
Hi
var/lib/mysql/mysql.sock
is created when MySQl runs, it may be a permissions problem with the
directory - does MySql have write permission for this directory
Peter
-Original Message-
From: Vishal Thakur [mailto:[EMAIL PROTECTED]
Sent: 01 June 2003 10:37
To: ABHIJIT NAIK
Cc: MySQL;
Hi
One more suggestion that does work reasonably well.
Generate a basic HTML page with a table laid out to suit the labels, in php,
with addresses in place
Write the page to your webspace as labels.htm (you will need to set
permissions to allow this)
You then need a program that will open and
HI
MySQL does not support sub selects/nested queries :(
Peter
-Original Message-
From: Eric Leupold [mailto:[EMAIL PROTECTED]
Sent: 29 March 2003 16:43
To: [EMAIL PROTECTED]
Subject: Nested SQL QUERY
I hope someone can help me with a syntax error I'm getting with a nested
query. I'm
Hi
AUTO_INCREMENT needs to be an integer, NUMERIC is a decimal?
not 100% sure but it looks like it
Peter
-Original Message-
From: Cesar Baquerizo [mailto:[EMAIL PROTECTED]
Sent: 24 March 2003 20:59
To: MySQL
Subject: CREATE syntax wrong?
Hello,
I am on:
mysql Ver 11.18 Distrib
$result=mysql_query(SELECT
items.*, city.City
FROM
items, city
WHERE
items.Category='$Category'
AND items.CityID='$CityName'
AND items.CityID=21
ORDER BY
City
);
while ($row=mysql_query($result)) {
hi
have you run mysql_install_db ?
this sets up the mysql database initially
Peter
-Original Message-
From: John Almberg [mailto:[EMAIL PROTECTED]
Sent: 01 March 2003 20:44
To: [EMAIL PROTECTED]
Subject: Can't start mysql
I'm trying to install MySQL 3.23 on a RedHat Linux Version 8.0
Hi
Like the look of the way its taking shape.
I am not sure if there is existing faq software (I've checked sourceforge
and freshmeat without much luck) we could use, or if someone can do a better
job :) but I have a content management system written, together with a lot
of the search
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
---
-Original Message-
From: mnbv [mailto:[EMAIL PROTECTED]]
Sent: 02 January 2003 00:23
To: Peter Lovatt; Stefan Hinz, iConnect (Berlin); David T-G; mysql users
Subject: RE: FAQ
[mailto:[EMAIL PROTECTED]]
Sent: 02 January 2003 00:37
To: Peter Lovatt
Cc: Stefan Hinz, iConnect (Berlin); David T-G; mysql users
Subject: Re: FAQ hosting site (was Re: An Idea)
On Wed, Jan 01, 2003 at 11:08:58PM -, Peter Lovatt wrote:
I am not sure if there is existing faq software (I've
Hi
A faq without questions would be pretty empty!
While you have the questions why not keep a note (or send them to me) Once
we have some momentum we can put some answers and tutorials together.
I thought I would email MySql to see if they like the idea, if not then I
will build it.
Peter
Hi
My first thought was that the docs on mysql.com should do the job, but,
although they answer most technical questions, often more down to earth
stuff like 'How do I store images' or 'how do I get started with SQL' isn't
there, or it is difficult to find.
The other problem is that the
tel. 0121-242-1473
International +44-121-242-1473
---
-Original Message-
From: JamesD [mailto:[EMAIL PROTECTED]]
Sent: 30 December 2002 01:35
To: Peter Lovatt; [EMAIL PROTECTED]
Subject: RE: An Idea
while Paul probably wouldnt say it, I would
hi
mysql_insert_id
http://www.php.net/manual/en/function.mysql-insert-id.php
should do it!
Peter
---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel.
You are missing a comma
update music
set cut = '' , mamended = '20021214013349' where mrecno = '1'
HTH
Peter
---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
Hi
It means you are refering to/using a result id that does not exist. Maybe
the query changed or the database is down?
Try echoing the query and the error
echo mysql_error ( [resource link_identifier])
if not could you send more details to give us a little more to go on
Peter
Hi
Postgre might be a better bet, as it supports more of the features you are
looking for.
Peter
---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel.
Look at GRANT
Peter
---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
Hi
Yes the list works!
It sounds as though you do not have support for the character set you are
using. Check the MySql manual for supported character sets.
HTH
Peter
---
Excellence in internet and open source software
Hi
Cobalt uses 'cobalt-mysql' as the default mysql root password. I spent hours
trying to sort this one out, reinstalled the whole thing, manually recreated
Mysql database all sorts
Stupid to use non standard setup really.
If that doesn't work come back to me.
Peter
Hi
have you looked at GRANT
http://www.mysql.com/doc/en/GRANT.html
I think it is what you are looking for
Peter
---
Excellence in internet and open source software
---
Sunmaia
Birmingham
UK
www.sunmaia.net
-Original Message-
From: William Martell [mailto:willmartell;yahoo.com]
Sent: 11 November 2002 20:02
To: MySQL Main List
Subject: SCHEMA, ARCHITECTURE ???
Hello All,
How do I determine the best architecture for my MySQL database?
Years of painful but fulfilling experience :)
Seriously
phpMyAdmin has an 'export to csv or Excel' function. If you are running php
this will produce a CSV file you can import directly into Excel
http://www.phpwizard.net/projects/phpMyAdmin/
hth
Peter
---
Excellence in internet and open source software
Hi
There is an article on sitepoint.com about benchmarking J2EE and .NET and
some controversy over the result
http://www.sitepoint.com/newsletters/viewissue.php?fid=3id=3issue=52
Does anybody have experience of php/MySql in comparison with either of the
above in terms of efficiency or ultimate
Hi
You could use either normal or fulltext searches. Regexp may well be a good
answer (not used it myself). The following should also work
SELECT *
FROM table
WHERE
field LIKE % cat %
OR field LIKE % cat. %
OR field LIKE % cat, %
(note the spaces to make sure you get only complete words)
or if
---
-Original Message-
From: Martin Hudec [mailto:corwin;corwin.sk]
Sent: 29 October 2002 09:18
To: Peter Lovatt
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re[4]: [PHP-DB] database synchronization
Hello Peter,
okay :)))so far I understand...buthmmm let me
Hi
If this is the full code you are missing the final } to close the function
I find it helps to comment the closing brackets
HTH
Peter
function dtb_qry_tbl_dsp($qry, $qry1, $qry2)
{
$result = mysql_query($qry);
$result1 = mysql_query($qry1);
$result2 = mysql_query($qry2);
$i = 0;
Hi
Bigger than my experience, so just a suggestion - have you looked at
replication?
If you have a master which does all the processing and (multiple) slaves
which handle all the reads then you might benefit from cheaper Intel
hardware and have a more robust system to boot.
Good luck!
Peter
Hi
insert_id returns the key value. I use php, and the mysql_insert_id is the
last insert_id on that connection, so even if other processes have added new
records in the time the script runs the insert_id is the correct one.
You can then use that as the key in the detail records.
HTH
Peter
hi
ALTER TABLE `database1`.`tablename` ADD `newfield` TINYINT NOT NULL;
ALTER TABLE `database2`.`tablename` ADD `newfield` TINYINT NOT NULL;
ALTER TABLE `database3`.`tablename` ADD `newfield` TINYINT NOT NULL;
ALTER TABLE `database4`.`tablename` ADD `newfield` TINYINT NOT NULL;
etc
or script
Hi
Two thoughts
try \r\n instead of \n
or
if you are getting warnings it may be that there is a problem with the
data - illegal characters or something?
if neither works email me offlist and I will take a look, if that helps.
HTH
Peter
---
the port is part of the server parameter in the connection eg port 3307
mysql_connect ( localhost:3307 , username , password )
http://www.php.net/manual/en/function.mysql-connect.php
has the details
HTH
Peter
---
Excellence in internet and open
Hi
I am running php/mysql on 2x PIII 1 GHz / 512MB RAM / SCSI and can run
queries on datasets of 220,000
SELECT * FROM `Tablename` WHERE `Prod_code` LIKE 'A43611109%' in less time
than I can count (0.1 sec at a guess)
The insert/update bit is the bit which will dictate the speed - how many
---
-Original Message-
From: Ed Carp [mailto:[EMAIL PROTECTED]]
Sent: 06 October 2002 21:08
To: Peter Lovatt; Robert H.R. Restad; [EMAIL PROTECTED]
Subject: RE: Performance Question.
I am running php/mysql on 2x PIII 1 GHz / 512MB RAM / SCSI
SOUNDEX might meet your needs
http://www.mysql.com/doc/en/String_functions.html
Peter
---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
---
-Original Message-
From: Paul Romanic
select * from table1 insert into table2
both tables need the same structure
Peter
---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
1 - 100 of 154 matches
Mail list logo