Nathan Nobbe wrote:
what is $ret, an array?
No, it's a mysql result object.
no, its the contents of the first cell in the first record of the
result set; from the doc on mysql_result(),
http://www.php.net/manual/en/function.mysql-result.php
which is what the function is using.
Yep,
On Feb 10, 2008 1:12 PM, nihilism machine [EMAIL PROTECTED] wrote:
Ok, I read the php.net info. so with this function though:
public function select_one($sql) {
$this-last_query = $sql;
$r = mysql_query($sql);
if (!$r) {
2008. 02. 10, vasárnap keltezéssel 13.12-kor nihilism machine ezt írta:
Ok, I read the php.net info. so with this function though:
public function select_one($sql) {
$this-last_query = $sql;
$r = mysql_query($sql);
if (!$r) {
Mike Yrabedra wrote:
Can anyone recommend a good php-mysql session handler class?
http://www.php.net/manual/en/function.session-set-save-handler.php#79706
looks ok.
--
Postgresql php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Adam Williams wrote:
select date_format('contract.length_start', '%m-%d-%Y') as length_start
from contract where user_id = 1;
This has nothing to do with PHP, but the first parameter to date_format
should not be in quotes.
-Stut
--
http://stut.net/
--
PHP General Mailing List
no need for quotes
select date_format(contract.length_start, '%m-%d-%Y') as length_start from
contract where user_id = 1;
bastien
Date: Thu, 3 Jan 2008 08:30:55 -0600 From: [EMAIL PROTECTED] To:
php-general@lists.php.net Subject: [PHP] mysql date question I have a
field in mysql as
[snip]
I have a field in mysql as shown by describe contract;
| length_start | date| YES | | NULL
||
Which stores it in the mysql format of -MM-DD. However, I need the
output of my select statement to show it in MM-DD- format. I can
Uhm, a shot in the dark - try:
select date_format(contract.length_start, '%m-%d-%Y') as length_start
HTH, cheers!
Silvio
Adam Williams wrote:
I have a field in mysql as shown by describe contract;
| length_start | date| YES | | NULL
||
Which
On Thu, January 3, 2008 8:30 am, Adam Williams wrote:
I have a field in mysql as shown by describe contract;
| length_start | date| YES | | NULL
||
Which stores it in the mysql format of -MM-DD. However, I need
the
output of my select
M5 wrote:
On 20-Dec-07, at 1:17 AM, Per Jessen wrote:
René Fournier wrote:
I'm really not sure what to try next. ps -aux shows MySQL as hogging
the CPU, not PHP or Terminal:
When this happens, do a 'SHOW PROCESSLIST' in mysql to see what it's
doing.
I have, and I can't see anything
nevermind, I see I had a mistake in my mysql statement, I should of been:
select DATE_FORMAT(testdate, '%m\-%d\-%Y') as date_column from testtable;
please disregard.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Thanks for your answer. Are you sugesting - what I think is called - a
multi-master replication? Since I would like to keep two sources in sync
and want to be able to make changes on both servers. I know very little
about replication. Maybe I'm making a bigger problem of this than it
David Zentgraf escribió:
Hi,
I'm trying to upgrade a server running CentOS 3 to an up-to-date MySQL 5
installation + PHP4. I installed the MySQL 5 package, server and client,
via RPMs and they work fine, the client tells me it's version 5.0.45. I
went on to recompile PHP 4.4.7 --with-mysql,
On 23. Oct 2007, at 19:55, Martin Marques wrote:
Wouldn't it be easier to upgrade to CentOS 5?
We tried to explain that to our host, but their service *major
expletive*, and other hosts in Tokyo ain't better either. :-(
Chrs,
Dav
--
PHP General Mailing List (http://www.php.net/)
To
Jason Paschal wrote:
just wanted to know if any of you have seen anything geared for this sort of
content, something professional-looking that doesn't come with a huge
learning curve. it wouldn't have to be TOO fancy, i could probably make
something, but didn't want to re-invent the
the crap out of everything - don't hit the DB unless you really
need to.
-Stut
--
http://stut.net/
-Original Message-
From: Stut [mailto:[EMAIL PROTECTED]
Sent: Friday, October 05, 2007 4:31 PM
To: Stefano Esposito
Cc: php-general@lists.php.net
Subject: Re: [PHP] MySQL
On 10/8/07, Philip Thompson [EMAIL PROTECTED] wrote:
Hi. This may not be best practice, but I think it's great to use -
especially since I can use multiple functions with the same database
connection w/o having to send the db link/resource. Store the connection in
the GLOBALS variable - this
On 10/6/07, CK [EMAIL PROTECTED] wrote:
Hi,
Here's the mission, creating a movie DB, I need the results returned
from mySQL in an XML format for use with the FLASH Professional
DataGrid. Any tips on formating mySQL results would be grand. Here's
the structure of the DB, if needed.
you
-Original Message-
you could easily just print the xml manually.
dvd
titleIDfoo/titleID
baretc/bar
/dvd
or, i believe mysql will return XML output but i'm not sure a PHP
function exists to do that.
no need to use fancy DOM functions, outputting XML is easy, parsing it
On 10/6/07, Daevid Vincent [EMAIL PROTECTED] wrote:
Here's the 'functions_xml.inc.php' file I use, it has served me well and
handles I believe all tag cases, personally I'm a big fan of using the
attributes as they're most easily parsed out in the PHP DOM functions:
I made this at one point:
Stefano Esposito wrote:
is it somehow possible to store the connection reference obtained from mysql_connect()
(note the absence of the i) in a $_SESSION element?
No. Why would you want to? You'd end up holding on to a database
connection even when nothing is using it. If you want to
Stut
What's good for multiple webservers? thanks
-Original Message-
From: Stut [mailto:[EMAIL PROTECTED]
Sent: Friday, October 05, 2007 4:31 PM
To: Stefano Esposito
Cc: php-general@lists.php.net
Subject: Re: [PHP] MySQL and SESSIONs
Stefano Esposito wrote:
is it somehow possible
unless you really
need to.
-Stut
--
http://stut.net/
-Original Message-
From: Stut [mailto:[EMAIL PROTECTED]
Sent: Friday, October 05, 2007 4:31 PM
To: Stefano Esposito
Cc: php-general@lists.php.net
Subject: Re: [PHP] MySQL and SESSIONs
Stefano Esposito wrote:
is it somehow possible
[snip]
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, long-running queries, most
tedd wrote:
I was thinking that I could ftp the sql file to the clients server
and then run a php script on his server, something like:
$sql = mysql -h$dbhost -u$dbuser -p$dbpass $dbname $filename;
system($sql);
But, that didn't work -- however -- using mysqldump did download the
file. So,
tedd wrote:
I know that this is not a php question, but all of you are so smart I
thought would ask anyway.
I need to upload a 5 Meg sql file to a client's database. However, his
site's phpMyAdmin shows a maximum file size limit of 2 Meg.
Now, is this something that is controlled by his
At 4:46 PM +0100 9/11/07, Stut wrote:
tedd wrote:
I know that this is not a php question, but all of you are so smart
I thought would ask anyway.
I need to upload a 5 Meg sql file to a client's database. However,
his site's phpMyAdmin shows a maximum file size limit of 2 Meg.
Now, is this
tedd wrote:
At 4:46 PM +0100 9/11/07, Stut wrote:
tedd wrote:
I know that this is not a php question, but all of you are so smart I
thought would ask anyway.
I need to upload a 5 Meg sql file to a client's database. However,
his site's phpMyAdmin shows a maximum file size limit of 2 Meg.
tedd wrote:
I was thinking that I could ftp the sql file to the clients server and
then run a php script on his server, something like:
$sql = mysql -h$dbhost -u$dbuser -p$dbpass $dbname $filename;
system($sql);
But, that didn't work -- however -- using mysqldump did download the
file. So,
tedd wrote:
At 4:46 PM +0100 9/11/07, Stut wrote:
tedd wrote:
I know that this is not a php question, but all of you are so smart I
thought would ask anyway.
I need to upload a 5 Meg sql file to a client's database. However,
his site's phpMyAdmin shows a maximum file size limit of 2 Meg.
Chris wrote:
tedd wrote:
I was thinking that I could ftp the sql file to the clients server and
then run a php script on his server, something like:
$sql = mysql -h$dbhost -u$dbuser -p$dbpass $dbname $filename;
system($sql);
But, that didn't work -- however -- using mysqldump did
brian wrote:
tedd wrote:
I was thinking that I could ftp the sql file to the clients server and
then run a php script on his server, something like:
$sql = mysql -h$dbhost -u$dbuser -p$dbpass $dbname $filename;
system($sql);
But, that didn't work -- however -- using mysqldump did download
brian wrote:
I'm setting up a site and am having loads of problems with MySQL (which
i don't use much, being a Postgres fan). The server is not controlled by
myself and I'm waiting on a reply from the admin. In the meantime:
PHP 4.3.9
Mysql 4.1.10a (server) 3.23.49 (client)
The database has
Janet Valade wrote:
First, if you are having an access denied problem, you will get a PHP
error message. Perhaps you have errors turned off in your PHP script.
Turn them on until you get it working.
I forgot to mention that i've temporarily set:
ini_set('track_errors', TRUE); // to access
At 3:00 PM -0400 9/4/07, brian wrote:
I'm setting up a site and am having loads of problems with MySQL
(which i don't use much, being a Postgres fan). The server is not
controlled by myself and I'm waiting on a reply from the admin. In
the meantime:
PHP 4.3.9
Mysql 4.1.10a (server) 3.23.49
On 8/24/07, Linux NG/Lists [EMAIL PROTECTED] wrote:
b) Why does the error reporting NOT work as soon as I jam a $db new
mysql call into the code?
Because you disabled it with an '@'.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
comex wrote:
On 8/24/07, Linux NG/Lists [EMAIL PROTECTED] wrote:
b) Why does the error reporting NOT work as soon as I jam a $db new
mysql call into the code?
Because you disabled it with an '@'.
Well, I suppose I should say Doh! but even when I get rid of the
@, I still get a blank
Linux NG/Lists wrote:
?php
error_reporting(E_ALL);
ini_set('display_errors','On');
@ $db=new mysqli('localhost','whil','secret','test');
get rid of the @, it will squelch your error output
if (mysqli_connect_errno())
{echo 'Error could not connect to database.';
exit;
}
?
put something at
Well, I suppose I should say Doh! but even when I get rid of the
@, I still get a blank page - no errors, and no database, either!
A followup - I'm taking this over to PHP-DB since it's now
database-centric, I think.
This still fails:
$db = new mysqli(
But this works
$conn =
John Pillion wrote:
This is as much a mysql question as it is php.
What is the most reliable way to retrieve an auto_increment key/id for a
query you just inserted?
In other words, I compile all my data, insert it into a new row, and now I
want to retrieve the ID it created for it in
Thanks guys, that's exactly what I was looking for
J
-Original Message-
From: M. Sokolewicz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 21, 2007 4:51 PM
To: John Pillion
Cc: php-general@lists.php.net
Subject: Re: php/mysql - getting ID of query
John Pillion wrote:
This is as much
In most systems, database connections are pooled, meaning that when you give
them up, they are not completely closed but the sql client software keeps
them in a pool available for the next script asking for a similar
connection, thus saving on the time to establish a connection.It is the
PHP Mailing List wrote:
Can I maintain just one mysql connection resource to all my pages per
user session. As far as I knows create connection is more expensive than
executing queries ?
No, you can't store resources (of which mysql connections are one
example) in sessions.
Any reference
The underlying problem is that there is no one Extended ASCII. There's a
dozen or so different schemes for the 129-255 range, all of them
incompatible. That's why Unicode now exists. :-)
I've been tracking this issue myself on my blog, which may be of background
use for you (especially some
On Mon, June 11, 2007 7:34 pm, Larry Garfield wrote:
You may find this useful:
http://us.php.net/manual/en/function.mb-convert-encoding.php
It is frequently reasonably good at guessing the incoming character
set, at
least the one time we used it at work. Try running all pages/strings
Richard Lynch wrote:
On Wed, May 2, 2007 4:32 pm, Brad Fuller wrote:
Richard Lynch wrote:
I have this simple database and I'm going to have a handful
of people editing it...
I'd like to track each and every edit with username, and,
ideally, provide myself an easy Undo if I decide [bleep] is
Richard Lynch wrote:
I have this simple database and I'm going to have a handful
of people editing it...
I'd like to track each and every edit with username, and,
ideally, provide myself an easy Undo if I decide [bleep] is
an idiot and shouldn't have done that.
Now, I'm not real
On Wed, May 2, 2007 4:32 pm, Brad Fuller wrote:
Richard Lynch wrote:
I have this simple database and I'm going to have a handful
of people editing it...
I'd like to track each and every edit with username, and,
ideally, provide myself an easy Undo if I decide [bleep] is
an idiot and
At 5:53 PM -0700 4/10/07, Jim Lucas wrote:
Anyways, here is the expanded version hopefully to your liking.
?php
// do that db connection thing...
// select you database
$sql = SELECT
Client
FROM
booked
WHERE
Name = 'larry'
;
if
tedd wrote:
At 5:53 PM -0700 4/10/07, Jim Lucas wrote:
Anyways, here is the expanded version hopefully to your liking.
?php
// do that db connection thing...
// select you database
$sql = SELECT
Client
FROM
booked
WHERE
Name = 'larry'
;
if ( ( $result =
At 10:18 PM +0100 4/9/07, [EMAIL PROTECTED] wrote:
If I search for something in mysql that returns an empty result I
cant get it to return
No result found always returns Found even though the recoed does
not exist...
$sql = SELECT Client FROM booked WHERE Name = 'larry';
$result =
[EMAIL PROTECTED] wrote:
If I search for something in mysql that returns an empty result I cant
get it to return
No result found always returns Found even though the recoed does not
exist...
$sql = SELECT Client FROM booked WHERE Name = 'larry';
$result = mysql_query($sql);
if ($result ==
$result == means:
Your SQL query is so f'ed up, I couldn't even run it.
It does NOT mean:
Your query returned zero rows, a perfectly normal and common condition.
You want http://php.net/mysql_num_rows
And, actually, $result is FALSE, not really , when the query is wrong.
On Mon, April 9, 2007
I am amazed by the sheer number of just plain WRONG answers to this
one...
Were they all from April 1 or something?...
--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?
--
PHP
Richard Lynch wrote:
I am amazed by the sheer number of just plain WRONG answers to this
one...
Were they all from April 1 or something?...
Yes it's unfortunate. I think part of the problem was that several
people, including myself, weren't entirely clear on what he was after.
When I
Turn on MAGIC QUOTES and REGISTER GLOBALS
Once you've done that, install Postgres. Run your MySQL command again,
Postgres has much better error reporting and will assist in debugging the
situation.
You might consider replacing your javascript functions with PHP ones since JS
can sometimes
Richard Lynch wrote:
I am amazed by the sheer number of just plain WRONG answers to this
one...
Were they all from April 1 or something?...
so, are you saying that my answer was wrong, or just making a statement.
If my answer was wrong, it was because it was too simple, which is what I was
[EMAIL PROTECTED] wrote:
Turn on MAGIC QUOTES and REGISTER GLOBALS
Once you've done that, install Postgres. Run your MySQL command again,
Postgres has much better error reporting and will assist in debugging the
situation.
You might consider replacing your javascript functions with PHP ones
No.
Despite the fact that I replied to your message as it was the last
one, and that caused threaded mail readers to place my post directly
under yours as a reply, my comment was not specifically directed at
your post.
I had deleted the way wrong posts by the time I realized I wanted to
say
On Tue, 2007-04-10 at 20:48 -0500, Richard Lynch wrote:
No.
Despite the fact that I replied to your message as it was the last
one, and that caused threaded mail readers to place my post directly
under yours as a reply, my comment was not specifically directed at
your post.
I had deleted
Top-posting is sublime. Embrace it. Why scroll through 10 pages of emails
you've already read when you can get to the meat of it all in the first few
lines of an email? :)
Plus trying to quickly separate all the previous replies from the latest one
when some emailers indent, indent with
If I search for something in mysql that returns an empty result I cant get
it to return
No result found always returns Found even though the recoed does not
exist...
$sql = SELECT Client FROM booked WHERE Name = 'larry';
$result = mysql_query($sql);
if ($result == )
{
echo No result
[EMAIL PROTECTED] wrote:
If I search for something in mysql that returns an empty result I cant
get it to return
No result found always returns Found even though the recoed does
not exist...
$sql = SELECT Client FROM booked WHERE Name = 'larry';
$result = mysql_query($sql);
if ($result ==
Em Segunda 09 Abril 2007 18:27, Lori Lay escreveu:
[EMAIL PROTECTED] wrote:
If I search for something in mysql that returns an empty result I cant
get it to return
No result found always returns Found even though the recoed does
not exist...
$sql = SELECT Client FROM booked WHERE
At 4/9/2007 02:18 PM, [EMAIL PROTECTED] wrote:
If I search for something in mysql that returns an empty result I
cant get it to return
No result found always returns Found even though the recoed does
not exist...
$sql = SELECT Client FROM booked WHERE Name = 'larry';
$result =
An empty result is still a valid result. As long as the SQL statement is
valid, you will get a result set. This doesn't meant that the variable
holding the reference to the result set is itself empty, but that you will
fail to fetch any results from it.
Satyam
- Original Message -
Davi wrote:
Hi all!
I'm developing an OOP app using PHP 5.
I want to use try-catch with mysql functions.
So, the question is: what are the exceptions classes of MySQL?
Where can I found it?
IIRC mysqli (certainly not mysql) extension does not throw exceptions,
so write code that checks
$sql = SELECT count(Email) as numEmails, Email FROM mena_guests WHERE
Voted='yes' GROUP BY Email ORDER BY numEmails DESC LIMIT $startingID,
$items_numbers_list;
--
itoctopus - http://www.itoctopus.com
Me2resh Lists [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
hi
i need help
$sql = SELECT count(Email) as numEmails, Email FROM mena_guests WHERE
Voted='yes' GROUP BY Email ORDER BY numEmails DESC LIMIT $startingID,
$items_numbers_list;
I answered this morning, I don't know why it got deleted
--
itoctopus - http://www.itoctopus.com
Me2resh Lists [EMAIL PROTECTED] wrote
Martin Zvarík wrote:
I did a benchmark with and without caching to HTML file and it's like:
0.0031 sec (with) and 0.0160 sec (with database)
I know these miliseconds don't matter, but it will have significant
contribution in high-traffic website, won't it?
I would say yes. A good caching
On 21/11/06, Richard Lynch [EMAIL PROTECTED] wrote:
On Sun, November 12, 2006 6:02 pm, Dotan Cohen wrote:
If I have to perform 30 LIKE searches for different keywords in a
varchar field, which strategy would be recommended:
1) 30 searches, one for each keyword
2) To select the varchar field
At 1:50 PM +0200 11/22/06, Dotan Cohen wrote:
Thanks, Richard. I'm looking into the full text index again.
Dotan Cohen
Dotan:
The following is a great reference -- the code works and it gave me
the basics to do full-text searches.
http://www.phpfreaks.com/tutorials/129/0.php
Go though
On 22/11/06, tedd [EMAIL PROTECTED] wrote:
At 1:50 PM +0200 11/22/06, Dotan Cohen wrote:
Thanks, Richard. I'm looking into the full text index again.
Dotan Cohen
Dotan:
The following is a great reference -- the code works and it gave me
the basics to do full-text searches.
Chris wrote:
David Tulloh wrote:
Dotan Cohen wrote:
If I have to perform 30 LIKE searches for different keywords in a
varchar field, which strategy would be recommended:
1) 30 searches, one for each keyword
2) To select the varchar field from all the rows, and search through
them with php's
Larry Garfield escreveu:
On Monday 13 November 2006 17:51, Chris wrote:
It's not going to make a great deal of difference if you do the
processing in the MySQL or the PHP, in this case it's basically the same
operation in each. I suspect that efficiently recreating the LIKE
functionality
On 14/11/06, Larry Garfield [EMAIL PROTECTED] wrote:
As a general rule, I try to push as much logic into the query as I can for the
simple reason that MySQL is optimized C and my PHP code gets interpreted.
The odds of me writing something in PHP that's faster than MySQL AB's C code
are slim. :-)
On 13/11/06, Chris [EMAIL PROTECTED] wrote:
Dotan Cohen wrote:
If I have to perform 30 LIKE searches for different keywords in a
varchar field, which strategy would be recommended:
1) 30 searches, one for each keyword
No. Horribly inefficient.
2) To select the varchar field from all the
On 13/11/06, David Tulloh [EMAIL PROTECTED] wrote:
Dotan Cohen wrote:
If I have to perform 30 LIKE searches for different keywords in a
varchar field, which strategy would be recommended:
1) 30 searches, one for each keyword
2) To select the varchar field from all the rows, and search
Dotan Cohen wrote:
If I have to perform 30 LIKE searches for different keywords in a
varchar field, which strategy would be recommended:
1) 30 searches, one for each keyword
2) To select the varchar field from all the rows, and search through
them with php's array functions?
It's not going to
On Tue, 2006-11-14 at 00:51 +1100, David Tulloh wrote:
Dotan Cohen wrote:
If I have to perform 30 LIKE searches for different keywords in a
varchar field, which strategy would be recommended:
1) 30 searches, one for each keyword
2) To select the varchar field from all the rows, and search
David Tulloh wrote:
Dotan Cohen wrote:
If I have to perform 30 LIKE searches for different keywords in a
varchar field, which strategy would be recommended:
1) 30 searches, one for each keyword
2) To select the varchar field from all the rows, and search through
them with php's array functions?
On Monday 13 November 2006 17:51, Chris wrote:
It's not going to make a great deal of difference if you do the
processing in the MySQL or the PHP, in this case it's basically the same
operation in each. I suspect that efficiently recreating the LIKE
functionality in PHP wouldn't be
Dotan Cohen wrote:
If I have to perform 30 LIKE searches for different keywords in a
varchar field, which strategy would be recommended:
1) 30 searches, one for each keyword
No. Horribly inefficient.
2) To select the varchar field from all the rows, and search through
them with php's array
It's currently a little bit late in the US and you only waited 2 hours
since your last post. While this is an international list the majority
of the posters are US based. Not getting a response within two hours at
this time is not unusual and you should probably be more patient.
As for your
[EMAIL PROTECTED] wrote:
...
$link = mysql_connect(localhost, root, 040573);
what was your IP address again?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Yeah, I got this problem fixed. The datbase was listed under [chr] instead of
[integer].
Thanks for the help though.
- Original Message -
From: Xavier Casto
To: Rob W.
Cc: php-general@lists.php.net
Sent: Sunday, June 18, 2006 7:30 PM
Subject: Re: [PHP] mysql ORDER
perhaps this will work:
Select country , name from tbl_chassis order by ifnull(country,'')
didn't try it.
- Original Message -
From: weetat [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Thursday, June 15, 2006 8:14 AM
Subject: [PHP] mysql + PHP
Hi all,
I have SQL
hi , not working .
The empty value still sorted first.
Thanks.
Satyam wrote:
perhaps this will work:
Select country , name from tbl_chassis order by ifnull(country,'')
didn't try it.
- Original Message - From: weetat [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent:
-general@lists.php.net; Satyam [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Thursday, June 15, 2006 8:51 AM
Subject: Re: [PHP] mysql + PHP
hi , not working .
The empty value still sorted first.
Thanks.
Satyam wrote:
perhaps this will work:
Select country , name from tbl_chassis order
2006/6/15, weetat [EMAIL PROTECTED]:
Hi all,
I have SQL query , for example , Select country , name from
tbl_chassis order by country.
The problem of the sql statement is that , if there are empty value in
country field , it be sorted first .
How to do sorting the empty value last
? I
On Thu, June 15, 2006 1:14 am, weetat wrote:
I have SQL query , for example , Select country , name from
tbl_chassis order by country.
The problem of the sql statement is that , if there are empty value
in
country field , it be sorted first .
How to do sorting the empty value last
?
Thank all for your inputs.
Yes . the data should be null , really bad data , will try to change
database structure.
Richard Lynch wrote:
On Thu, June 15, 2006 1:14 am, weetat wrote:
I have SQL query , for example , Select country , name from
tbl_chassis order by country.
The problem
At 2:14 PM +0800 6/15/06, weetat wrote:
Hi all,
I have SQL query , for example , Select country , name from tbl_chassis
order by country.
The problem of the sql statement is that , if there are empty value in
country field , it be sorted first .
How to do sorting the empty value last
? I
On 5/14/06, Martin Zvarík [EMAIL PROTECTED] wrote:
Hi,
I am sorry for this not being really a PHP question, anyway I use
MySQL database, I have a table, which is HEAP (memory) type and I found
out I can store only about 22000 entries in it, then when I want to
insert new entry it gives me an
Martin Zvarík wrote:
Hi,
I am sorry for this not being really a PHP question
So you know it's off topic, yet you're going to ask anyway.
MySQL database, I have a table, which is HEAP (memory) type and I found
out I can store only about 22000 entries in it, then when I want to
insert new
On Tue, May 2, 2006 7:05 am, Ross wrote:
This is my database now...I will use the item_id for the order but
what if I
want to change item_id 3 to item id 1? How can I push all the items
down one
place? How can I delete any gaps when items are deleted.
Change item_id 3 to 1.
... select id
On Tue, May 2, 2006 7:22 am, chris smith wrote:
On 5/2/06, Ross [EMAIL PROTECTED] wrote:
This is my database now...I will use the item_id for the order but
what if I
want to change item_id 3 to item id 1? How can I push all the items
down one
place? How can I delete any gaps when items are
On 5/3/06, Richard Lynch [EMAIL PROTECTED] wrote:
On Tue, May 2, 2006 7:22 am, chris smith wrote:
On 5/2/06, Ross [EMAIL PROTECTED] wrote:
This is my database now...I will use the item_id for the order but
what if I
want to change item_id 3 to item id 1? How can I push all the items
down
Ross schrieb:
Just say I have a db
CREATE TABLE `mytable` (
`id` int(4) NOT NULL auto_increment,
`fileName` varchar(50) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
when I add items they go id 1,2,3 etc. Whn I delete them gaps appear.
This is my database now...I will use the item_id for the order but what if I
want to change item_id 3 to item id 1? How can I push all the items down one
place? How can I delete any gaps when items are deleted.
CREATE TABLE `board_papers` (
`id` int(4) NOT NULL auto_increment,
`doc_date`
301 - 400 of 1710 matches
Mail list logo