In the SQL standard this would be
AND NOT ministry_directory.listing_approved=0 AND NOT
ministry_directory.listing_approved=4
MySQL supports (and there are probably more RDBs that do):
AND ministry_directory.listing_approved!=0 AND
ministry_directory.listing_approved!=4
On Fri, Aug 29, 2008 at
or NOT IN (0,4)
-- matt
On Fri, Aug 29, 2008 at 12:19 PM, Evert Lammerts
[EMAIL PROTECTED]wrote:
In the SQL standard this would be
AND NOT ministry_directory.listing_approved=0 AND NOT
ministry_directory.listing_approved=4
MySQL supports (and there are probably more RDBs that do):
AND
Hi All,
Please help me to set the logging on in mysql. I am using the following
command when starting mysql:
service mysqld start --log=/usr/local/
But logging is not maintained through this command.
Best Regards,
Manoj Kumar Singh
You have to edit your my.cnf file. Here's a link to the docs:
http://dev.mysql.com/doc/refman/5.0/en/log-files.html
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Manoj Singh wrote:
Hi All,
Please help me to set the logging on in mysql. I am using the
Hi Micah,
Thanks for help.
Best Regards,
Manoj Kumar Singh
On Thu, Jul 24, 2008 at 11:02 AM, Micah Gersten [EMAIL PROTECTED] wrote:
You have to edit your my.cnf file. Here's a link to the docs:
http://dev.mysql.com/doc/refman/5.0/en/log-files.html
Thank you,
Micah Gersten
onShore
(i.e. stack_id 500 stack_id 601 vs where stack_id = 500 limit 100)
stack_id between 501 and 600 (stack_id 500 stack_id 601) is much
better
What I would like to know is if anybody has experience
implementing this sort of data structure in MySQL (linked list?) or
any advice.
tables:
Hello,
I'm looking at implementing a database-level stack for a (multi stack)
mail merge queue (able to queue up to 1 million messages per stack).
Current workflow:
server 1 (containing main db) transmits data sets (used to populate
mail merge template) to server 2
server 2 web-facing script
Hello Everybody,
We have 6 multi-master MySql instances within a LAN , that are
replicating is a sequential manner.
Server Environment : Six identical Linux Enterprise version 4 running,
servers with having MySQL version 6.
we are using MySQL multi-master replication method for database
On Tue, Feb 26, 2008 at 10:49 AM, Lasitha Alawatta [EMAIL PROTECTED] wrote:
Hello Everybody,
We have 6 multi-master MySql instances within a LAN , that are replicating
is a sequential manner.
Server Environment : Six identical Linux Enterprise version 4 running,
servers with having MySQL
I did not say: do not ask on this list.
I said: you would get BETTER answers if you asked on a MySQL list.
_
De: Lasitha Alawatta [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 26 de fevereiro de 2008 13:47
Para: Thiago Pojda
Assunto: RE: [PHP-DB] MySQL replication delaying issue
; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Assunto: [PHP-DB] MySQL replication delaying issue
Prioridade: Alta
Hello Everybody,
We have 6 multi-master MySql instances within a LAN , that are replicating
is a sequential manner.
Server Environment : Six identical Linux Enterprise version 4 running
Oky, Sorry for that.. J
From: Thiago Pojda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 26, 2008 8:49 PM
To: Lasitha Alawatta
Cc: php-db@lists.php.net
Subject: RES: [PHP-DB] MySQL replication delaying issue
I did not say: do not ask on this list.
I said: you would get
Hello,
Thanks a LOT...
Best Regards,
Lasitha
From: Thiago Pojda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 26, 2008 9:51 PM
To: Lasitha Alawatta
Cc: php-db@lists.php.net
Subject: RES: [PHP-DB] MySQL replication delaying issue
That's ok, good luck with your problem
Assunto: RE: [PHP-DB] MySQL replication delaying issue
Oky, Sorry for that.. J
From: Thiago Pojda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 26, 2008 8:49 PM
To: Lasitha Alawatta
Cc: php-db@lists.php.net
Subject: RES: [PHP-DB] MySQL replication delaying issue
I did not say: do
Web Developer/Administrator
(Direct) 503-605-4132
[EMAIL PROTECTED]
-Original Message-
From: Andrew Blake [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 08, 2007 7:51 AM
To: Instruct ICC
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] mysql data truncation does not cause an error
sidestepped.
Date: Thu, 8 Nov 2007 15:50:38 +
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
CC: php-db@lists.php.net
Subject: Re: [PHP-DB] mysql data truncation does not cause an error to be
thrown
Hiya
I could check the length of the field against the entry data and
javascript myself
Using mysql_query if i try to force more data than a field can have the
data is truncated yet no error is throw at all.
Is there a way round this ?
Cheers
Andy
This isn't exactly what you want to hear, but how about validating your input
before submitting a query?
Using mysql_query if i try to force more data than a field can have the
data is truncated yet no error is throw at all.
Is there a way round this ?
Cheers
Andy
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
To: Instruct ICC
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] mysql data truncation does not cause an error to
be thrown
Hiya
I could check the length of the field against the entry data and
javascript myself out of trouble but i was more worried that there is no
error or message when mysql
Hiya
I could check the length of the field against the entry data and
javascript myself out of trouble but i was more worried that there is no
error or message when mysql clearly returns one saying i've truncated
this yet php ignores it completely. It should fail or know about the
truncation
Maybe tell the list the exact solution?
File/variable/setting?
Cheers.
I figured it out
it was the mysql install not php :-)
cheers for your help though :-)
Vandegrift, Ken wrote:
You may want to check the my.ini setting for the table type you are
using and see if there is a
Hello friends,
There is a tool call idera (SQL diagnostic manager). Basically it is
a performance monitoring and diagnostics tool.
It has a feature;
Identifying of worst-performing codes -
Identifies performance bottlenecks such as the worst-performing stored
procedures,
I am looking for some advice on how to achieve something and so far have
been unable to do what I am looking to do.
Here is the query I am using:
mysql SELECT *
- FROM `orders`
- WHERE `ordernum` LIKE 35132
- OR `price` LIKE 35132
- OR `partnum` LIKE 35132
- OR `vendor` LIKE
this is bugging me to no end (no pun intended)... I am getting the error:
invalid query: You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near 'Condition, ConstructType, BldgDimensions, Stories,
CurrentParking,
Condition is a reserved word in mysql...you will need to change the field name
bastien Date: Tue, 28 Aug 2007 18:11:20 -0700 From: [EMAIL PROTECTED] To:
php-db@lists.php.net Subject: [PHP-DB] mysql error... this is bugging me to
no end (no pun intended)... I am getting the error: invalid
John Pillion wrote:
this is bugging me to no end (no pun intended)... I am getting the error:
invalid query: You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near 'Condition, ConstructType, BldgDimensions,
Hi All,
Any body has experience using MySQL Stored Procedures Views with PHP.
How is the performance of using SPs in mysql.
Lasitha Alawatta
Application Developer
Destinations of the World Holding Establishment
P O Box: 19950
Dubai, United Arab Emirates
DOTW DISCLAIMER:
Dear All
I'm running 3 servers with mysql database
- Local : 5.0.18-log, MySQL Community Edition (GPL)
- Main Server : 4.1.22-standard-log, MySQL Community Edition - Standard
(GPL)
- Backup Server : 4.1.20, Source Distribution
I copied a database from the Main Server to Local and Backup
Hi
I'm running 3 servers with mysql database
- Local : 5.0.18-log, MySQL Community Edition (GPL)
- Main Server : 4.1.22-standard-log, MySQL Community Edition - Standard
(GPL)
- Backup Server : 4.1.20, Source Distribution
I copied a database from the Main Server to Local and Backup Server
Chenri wrote:
Dear All
I'm running 3 servers with mysql database
- Local : 5.0.18-log, MySQL Community Edition (GPL)
- Main Server : 4.1.22-standard-log, MySQL Community Edition - Standard
(GPL)
- Backup Server : 4.1.20, Source Distribution
Not sure why you're surprised why they are
From: Instruct ICC [EMAIL PROTECTED]
Why is this second log entry present? I don't see any place where I ask
MySQL to authenticate an HTACCESS username.
It came to me. The very fact that we are using mod_auth_mysql in the Apache
web server means that Apache is trying to authenticate
In my apache web server error log, I see the following:
[Fri Jul 13 11:19:55 2007] [error] [client an.ip.addr.ess] MySQL ERROR:
Can't connect to MySQL server on 'mysql.server.ip.address' (110)
[Fri Jul 13 11:19:55 2007] [error] [client an.ip.addr.ess] MySQL user
anHTACCESSusername not found:
Hi All,
I want to load data from dump file to MySQL table using LOAD DATA INFILE
but there is Error 1366 :
mysql LOAD DATA
- INFILE 'D:/SITE/SOMETABLE.SQL'
- INTO TABLE SOMETABLE
- FIELDS TERMINATED BY ','
- OPTIONALLY ENCLOSED BY ''
- LINES TERMINATED BY ')';
ERROR 1366
elk dolk wrote:
Hi All,
I want to load data from dump file to MySQL table using LOAD DATA INFILE
but there is Error 1366 :
mysql LOAD DATA
- INFILE 'D:/SITE/SOMETABLE.SQL'
- INTO TABLE SOMETABLE
- FIELDS TERMINATED BY ','
- OPTIONALLY ENCLOSED BY ''
- LINES TERMINATED BY
Chetanji says,
This may be a typo of yours.
Look at the header...
CREATE TABLE `sometableo`
The 'o' is added by mistake?
Blessings,
Chetanji
elk dolk wrote:
Hi All,
I want to load data from dump file to MySQL table using LOAD DATA INFILE
but there is Error 1366 :
mysql LOAD DATA
I'm using BETWEEN to return a list all people who's last names fall between
A and F:
WHERE last_name BETWEEN 'A' AND 'F' ...
but it's only returning names between A and E. The same thing happens when I
use:
WHERE last_name = 'A' AND last_name = 'F' ...
Shouldn't this work the way I
I think you need between 'A' and 'F%'
Aa is between A and F
but 'Fa' is not between 'A' and 'F'
(but 'Ez' would be between 'A' and 'F')
-B
Tony Grimes wrote:
I'm using BETWEEN to return a list all people who's last names fall between
A and F:
WHERE last_name BETWEEN 'A' AND 'F' ...
but
Try using the substr, since you are only comparing the first letters...
(sorry I did not reply all on the other email, Dan)
i.e.
select name from users where substr(name, 1, 1) = 'A' and substr(name,
1, 1) = 'B';
-B
Dan Shirah wrote:
So just change it to WHERE last_name BETWEEN 'A' AND 'G' .
Yeah, but what do I do for Q-Z? I guess I¹ll have to write a condition to
use last_name = Q¹ if it finds a Z. I¹ll have to write conditions to look
for other exceptions too. Aaarrgh!
*looks up at the Gods*
Damn you BETWEEN! Why must you torture me so!?!
Have a good weekend.
On 5/18/07 2:51
Nice! That did the trick. Thanks Brad. I live to fight another day.
Tony
On 5/18/07 3:00 PM, Brad Bonkoski [EMAIL PROTECTED] wrote:
Try using the substr, since you are only comparing the first letters...
(sorry I did not reply all on the other email, Dan)
i.e.
select name from users
In MySQL, regardless of the documentation version,
http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html#function
_week I've seen the explanation for receiving a 0 from the WEEK function
depending on the mode setting which causes a range between 0-53.
But what about:
DAYOFMONTH 0 to
To: php-db@lists.php.net
Subject: [PHP-DB] MySQL Query on the Fly
Good Morning,
I've been searching and toying with this solution for some time but
can't find that right answer. Looking for solutions/suggestions to the
following:
I created a program that will allow people to track
Good Morning,
I've been searching and toying with this solution for some time but
can't find that right answer. Looking for solutions/suggestions to the
following:
I created a program that will allow people to track sales and depending
on what they've sold, they will either get a set
Chetan Graham wrote:
Hi to All,
I am having problems with the MySQL DB. It started with this command from
a call in a PHP script...
INSERT INTO docprouser (id,valid,password)VALUES
('user5','Y',md5('ksobhinyai')); or die(mysql_error());
That doesn't do anything (it will create a parse
hi
i need help regarding a sql query in my php app.
the query is :
$SQL = SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes'
LIMIT $startingID,$items_numbers_list;
i want to sort this query by the number of the repeated EMail counts.
can anyone help me with that please ?
On 4/3/07, Me2resh Lists [EMAIL PROTECTED] wrote:
hi
i need help regarding a sql query in my php app.
the query is :
$SQL = SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes'
LIMIT $startingID,$items_numbers_list;
i want to sort this query by the number of the repeated EMail
Hello,
I try your SQL statements. There is no problem on your SQL syntax
and you can use alias in the order by clause.:)
$SQL = SELECT EMail,count(EMail) AS repeated FROM mena_guests WHERE
Voted = 'yes' GROUP BY EMail ORDER BY repeated LIMIT
$startingID,$items_numbers_list;
--
Luchino - Samel wrote:
*Question No. 01*
there are some kind of foreign key in database
Some of them want give any error when you delete from the table where the
foreign key is in, this cause the remove is recursive and it delete
also
the ORDER linked to the CUSTOMER (CASCADE foreign key).
In
*Question No. 01*
there are some kind of foreign key in database
Some of them want give any error when you delete from the table where the
foreign key is in, this cause the remove is recursive and it delete also
the ORDER linked to the CUSTOMER (CASCADE foreign key).
In other kind of foreign key
Hello,
I have 2 issue, regarding MySQL Foreign Key.
I have two tables;
Table 01 CUSTOMER
column name
characteristic
SID
Primary Key
Full_Name
Table ORDERS
column name
characteristic
Order_ID
Primary Key
Order_Date
Customer_SID
Foreign Key
Amount
When I run
Hello all,
Is there a discussion list for MySQL queries (I have a rookie MySQL
query question and don't want to bug this list with it)
Ron
--
=
It's is not, it isn't ain't, and it's it's, not its, if you mean
it is. If you
Ron Croonenberg wrote:
Hello all,
Is there a discussion list for MySQL queries (I have a rookie MySQL
query question and don't want to bug this list with it)
http://lists.mysql.com/
--
Postgresql php tutorials
http://www.designmagick.com/
--
PHP Database Mailing List (http://www.php.net/)
howdy
- Original Message -
From: Chris [EMAIL PROTECTED]
To: Ron Croonenberg [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Thursday, March 22, 2007 7:06 AM
Subject: Re: [PHP-DB] MySQL queries
Ron Croonenberg wrote:
Hello all,
Is there a discussion list for MySQL queries (I have
I have this page that lists artists alphabetically:
http://www.wallacegalleries.com/artists.php
At least it did until today. Nobody made any changes to the files, but the
database stopped sorting by artist_id. The list shown is just the default
order that mysql spits out if the SORT BY clause is
too small a sort space on the server? have you checked the server config?
Bastien
From: Tony Grimes [EMAIL PROTECTED]
To: PHP-DB php-db@lists.php.net
Subject: [PHP-DB] MySQL sort stopped working
Date: Tue, 13 Mar 2007 13:22:25 -0600
I have this page that lists artists alphabetically:
http
Tony Grimes wrote:
I have this page that lists artists alphabetically:
http://www.wallacegalleries.com/artists.php
At least it did until today. Nobody made any changes to the files, but the
database stopped sorting by artist_id. The list shown is just the default
order that mysql spits out if
, bedul wrote:
- Original Message -
From: Micah Stevens [EMAIL PROTECTED]
To: Roberto F Tavares Neto [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Saturday, March 03, 2007 3:17 AM
Subject: Re: [PHP-DB] Mysql autentication problem
Strange. If you look at the users table
I did the reload, but with no effect...
On Sat, 3 Mar 2007 09:17:36 +0700, bedul wrote
- Original Message -
From: Micah Stevens [EMAIL PROTECTED]
To: Roberto F Tavares Neto [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Saturday, March 03, 2007 3:17 AM
Subject: Re: [PHP-DB] Mysql
*Subject:* Re: [PHP-DB] Mysql autentication problem
Reloading the grant tables should happen almost immediately unless
you have an extremely large set of users, very little memory, or a
very slow computer.
On 03/02/2007 06:17 PM, bedul wrote:
- Original Message
Hello,
I'm trying to do a very simple thing: create a database and a user to
use it.
So, initially, I use the web interface phpmyadmin. Logged as root, I
created the database, and the user with some password.
But, I could not login using phpmyadmin. Either any php-based system
could
Hi,
So it works from PHP w/o a password, but with a password does not? What are
you using for a password? I don't mean post it here, but are there any
'funny' characters in it? I've had trouble because of that before, on other
systems. Try a dumb, obviously OK password, like 'apples' and see
Ted,
I try the classic abc and had the same problem...
Roberto
Ted Fines escreveu:
Hi,
So it works from PHP w/o a password, but with a password does not?
What are
you using for a password? I don't mean post it here, but are there any
'funny' characters in it? I've had trouble because of
Hi,
When you're connecting from your PHP script, are you connecting from the
same machine that the db is on, or a different one? If a different one,
you'll need to do grant commands like:
grant all privileges on mydbname.* to 'mydbuser'@'myhostname.mycompany.net'
identified by 'mypassword';
Subject: [PHP-DB] Mysql autentication problem
Date: Fri, 02 Mar 2007 10:05:54 -0300
Hello,
I'm trying to do a very simple thing: create a database and a user to use
it.
So, initially, I use the web interface phpmyadmin. Logged as root, I
created the database, and the user with some password
From: Roberto F Tavares Neto [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] Mysql autentication problem
Date: Fri, 02 Mar 2007 10:05:54 -0300
Hello,
I'm trying to do a very simple thing: create a database and a user to
use it.
So, initially, I use the web interface phpmyadmin
Ted,
The [EMAIL PROTECTED] does the same effect as 'mydbuser'@'myhostname.mycompany.net'
, right?
Btw, for web apps, I got another user, @localhost only. This user is
working...
I thought it was a problem on the GUI, so I tried a [EMAIL PROTECTED] from
mysql command line. It fails too...
Did you give the user permissions to use the database in question?
Here's my sequence of actions:
.
1) Create DB if it doesn't exist
2) Create the user w/password
3) Give the user permission to use the database.
4) Flush privileges to update the server.
5) login and enjoy.
-Micah
Roberto F
Micah:
I did create the database. Then, I use the:
GRANT ALL PRIVILEGES ON db.* TO [EMAIL PROTECTED] IDENTIFIED BY 'password'
to do the 2 and 3 steps.
FLUSH PRIVILEGES
to do the step 4.
But the step 5 really does not work... only on the shell or when I
remove the password from the user...
Strange. If you look at the users table, is there a password hash in the
password field?
Roberto F Tavares Neto wrote:
Micah:
I did create the database. Then, I use the:
GRANT ALL PRIVILEGES ON db.* TO [EMAIL PROTECTED] IDENTIFIED BY 'password'
to do the 2 and 3 steps.
FLUSH PRIVILEGES
to
- Original Message -
From: Micah Stevens [EMAIL PROTECTED]
To: Roberto F Tavares Neto [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Saturday, March 03, 2007 3:17 AM
Subject: Re: [PHP-DB] Mysql autentication problem
Strange. If you look at the users table, is there a password hash
PROTECTED]
Cc: php-db@lists.php.net
Sent: Saturday, March 03, 2007 3:17 AM
Subject: Re: [PHP-DB] Mysql autentication problem
Strange. If you look at the users table, is there a password hash in the
password field?
i think this must be reload?? not just flush?? it happen to me
Subject: Re: [PHP-DB] Mysql autentication problem
Reloading the grant tables should happen almost immediately unless you have
an extremely large set of users, very little memory, or a very slow computer.
On 03/02/2007 06:17 PM, bedul wrote:
- Original Message -
From: Micah Stevens
No, it shouldn't because there are only two B's, one is followed by a
'v' (one of your exceptions) and the other is at the end of the line, right?
-Micah
Mike van Hoof wrote:
That is it almost :)
SELECT 'oer bv b' REGEXP 'b[^v]$|b[^v]\s?';
gives me 0 as a result, while it shoud give me 1,
Hello,
i am try to make a regular expression work, but keep getting an error
message
does anyone know how i can make it work?
The query is:
SELECT 'boer bv' REGEXP '[ b|^b](?![v$|v ])';
So it has to match each starting 'b' and all the b's pf following words.
But now followed by a v(line end)
Your code states:
Match: one of the following letters: -,b,|,^,b negative look ahead one
of these: -,v,$,|,v
Which isn't what you're looking for. Remember the negating '^' only
works at the start of a [] list. And '$' only means line-end if it's
outside [], inside it stands for the '$'
christine wrote:
Hi, I would ask which way is more efficient and save time? Save each row to
array or mysql_data_seek(0) ?
Probably mysql_data_seek(0).
That just resets the mysql pointer back to the start and so it doesn't
re-run the query or anything like that and doesn't take up any extra
Hi
Hi, I would ask which way is more efficient and save time? Save each row to
array or mysql_data_seek(0) ?
That totally depends on which resources are more valuable to you.
The array will likely use more memory but be faster to process.
While mysql_data_seek(0) would probably use no
Hello,
i am try to make a regular expression work, but keep getting an error
message
does anyone know how i can make it work?
The query is:
SELECT 'boer bv' REGEXP '[ b|^b](?![v$|v ])';
So it has to match each starting 'b' and all the b's pf following words.
But now followed by a v(line
I'm running thru a result set using fetch_assoc. Now I want to run through
it again.
How?
TIA,
Larry Woods
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have a table:
id fkid foobar
1 1 345yellow
2 1 34 red
3 2 3459 green
4 2 345brown
I want to select the largest value of foo for a unique fkid, and return
bar, the results ordered by bar. In this case, 345 is the largest value of
foo for fkid 1, and
Hi
Try:
SELECT fkid, MAX(foo), bar FROM table GROUP BY fkid ORDER BY bar DESC
Niel
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
select max(bar) from mytable where unique fkid order by bar asc
as far as I remember!!
-Original Message-
From: Peter Beckman [mailto:[EMAIL PROTECTED]
Sent: Lunes, 13 de Noviembre de 2006 04:59 p.m.
To: PHP-DB Mailing List
Subject: [PHP-DB] MySQL SQL Query Help
I have a table:
id
!!
-Original Message-
From: Peter Beckman [mailto:[EMAIL PROTECTED]
Sent: Lunes, 13 de Noviembre de 2006 04:59 p.m.
To: PHP-DB Mailing List
Subject: [PHP-DB] MySQL SQL Query Help
I have a table:
id fkid foobar
1 1 345yellow
2 1 34 red
3 2 3459 green
4 2
de Noviembre de 2006 04:59 p.m.
To: PHP-DB Mailing List
Subject: [PHP-DB] MySQL SQL Query Help
I have a table:
id fkid foobar
1 1 345yellow
2 1 34 red
3 2 3459 green
4 2 345brown
I want to select the largest value of foo for a unique fkid, and return
Peter Beckman wrote:
On Mon, 13 Nov 2006, [EMAIL PROTECTED] wrote:
Actually, that should not work, it should give you an error.
This should work:
SELECT `fkid`,max(`foo`) as foo,`bar` FROM `test2` GROUP BY `fkid`
ORDER BY `bar` ASC
Yes, but if the data is in a different order that fails
sorry, i meant that i wanted to remove the oldest entry and put in a
new entry with UPDATE or INSERT.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
whynot keep all and just sort/limit them to get the data you want?
bastien
From: bob plano [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: Re: [PHP-DB] mysql databases
Date: Sat, 14 Oct 2006 12:47:38 -0500
sorry, i meant that i wanted to remove the oldest entry and put in a
new entry
how would you add something new into a table and take out something
old? example:
(1) 1st something
(2) 2nd something
(3) 3rd something
(4) 4th something
and then you add in something new so then the table would look like
(1) new something
(2) 1st something
(3) 2nd something
(4) 3rd something
Hi Bob
Your question isn't very clear. Do you want to remove the oldest entry,
newest, or is there some other criteria to diceide?
Niel
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
He means that he wants to use REPLACE and take out the old entry and update
it with a new one. Although, you would probably use UPDATE instead.
--
Dave W
Hi
He means that he wants to use REPLACE and take out the old entry and update
it with a new one. Although, you would probably use UPDATE instead.
Hmmm... Thought this was DB list, not mind-readers.
I would also *guess* that would be the intention, but his example seems
to remove the newest
Ok, here's what i got in my mysql db. I got a table listed with numbers as
follows
1
2
3
4
5
6
7
10
11
12
13
14
15
16
17
18
19
20
21
22
25
These numbers I can display fine. I'm using ..
$query=SELECT * FROM db ORDER BY numbers ASC;
Right now it displays it as
1
10
11
12
.
2
22
23
25
(fieldname as integer) from table where ... order by ...
bastien
From: Rob W. [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] mysql ORDER BY problems
Date: Sun, 18 Jun 2006 17:19:03 -0500
Ok, here's what i got in my mysql db. I got a table listed with numbers as
follows
1
2
3
4
5
6
7
Hello, all. I don't know if this is a php-mysql question or just a
mysql, but here goes:
I have a list of DVDs that my library loans out, and I'd like to allow
people to add comments to each item. Since this list gets regenerated
periodically (it's extracted from another system, the library
One thing I've done in situations like this is just load your returned DB data
into an array. Something like this would do:
$dvdarr[$result['call_number']]['Title'] = $result['title'];
$dvdarr[$result['call_number']]['Publisher'] = $result['publisher'];
= $rows['title'];
}
//echo out the rest of the data
echo trtd.$rows['comment']./td/tr;
}
hth
Bastien
From: Andrew Darby [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] MySQL/PHP Left Join Question
Date: Thu, 25 May 2006 11:28:56 -0400
Hello, all. I don't know if this is a php
Some good examples of how to deal with this in PHP have already been
given, especially the associative array solution.
The question I have is with something like this, how do you weight out
the pros/cons of code development versus speed?
i.e. for code development breaking the logic up into 2
Thanks to Bastien and TG for their suggestions. I'd been looking at
it Bastien's way, but TG's is probably better suited to what I want to
do. I'd forgotten about that possibility, cramming it all into an
array . . . .
Again, thanks for the help,
Andrew
p.s. I'd be curious about the relative
test both and let us know
bastien
From: Andrew Darby [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: Re: [PHP-DB] MySQL/PHP Left Join Question
Date: Thu, 25 May 2006 12:33:15 -0400
Thanks to Bastien and TG for their suggestions. I'd been looking at
it Bastien's way, but TG's is probably
Hi Listies
I have a question
Is there any to query a mysql table to get it to return the field
names that it currently
has marked as Fulltext Indexes?
I need to build a searching engine, there are 60 tables being
searched, i have created the fulltext indexes on all tables required
and i
101 - 200 of 1362 matches
Mail list logo