Sounds better. Thanks
Jimmy Brake wrote:
> hmm
>
>
> i could be misunderstanding but
>
> select max(your_autoincrment_column) from your_table
--
John Taylor-Johnston
-
"If it's not open-source, it's Murphy's Law."
' '
10, 2003 1:41 PM
To: Eddie Lien
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] auto_increment $value
Necessary, or at least cleaner, if there are less than 5 records in your database.
> Why don't you just use "select * from table order by id DESC limit 0,5"?
>
> I
Necessary, or at least cleaner, if there are less than 5 records in your database.
> Why don't you just use "select * from table order by id DESC limit 0,5"?
>
> I don't see any necessary to get the auto_increment value.
> > Anyone know how to get the auto_increment $value out of a mysql table.
I'll have a look at that too. Thanks!
What do you make of this: My browser is all snuffed up! It dodnint wwork aniwore!
http://ccl.flsh.usherbrooke.ca/tools/
Choose Greid. Works ok.
Choose JDaxell and the stops working after 184.
Even with:
Too much HTML or too much in one . I'll have to ge
$news = mysql_query("SHOW TABLE STATUS FROM ".$db2." LIKE '$table2'");
while ($table_status = mysql_fetch_array($news))
{
$autoindex = $table_status['Auto_increment'];
}
Got it. Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/un
Hello,
John Taylor-Johnston <[EMAIL PROTECTED]> wrote:
> Anyone know how to get the auto_increment $value out of a mysql
> table.
> I'm thinking it is in mysql_fetch_array but don't see how to
> get it.
What do you exactly mean by "get the auto_increment $value"?
Perhaps, you're looking for t
Anyone know how to get the auto_increment $value out of a mysql table.
I'm thinking it is in mysql_fetch_array but don't see how to get it.
> $SQL = "SELECT * FROM table ORDER BY id asc LIMIT $autoindex -5 ,5;";
>
> I would like to get the autoindex value of my table and use it in my SQL. Can I
Look at Sequences for Postgres.
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
> -Original Message-
> From: webmaster [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 28, 2002 7:12 AM
> To: [EMAIL PROTECTED]
>
I think this is any easy question, but I couldn't find an answer in the
php Black Book for PostgreSQL. Does anyone know the equivilant of
auto_increment for PostgreSQL? This is the php code that I have:
$query = "CREATE table $tablename (id INT NOT NULL PRIMARY KEY, ip TEXT,
customer TEXT, dslp
I'm using PHP v.4.0.6. and PostgreSQL 7.2. Does any one know the
equivilant of auto_increment for postgresSQL? For example when creating
a table:
$query = "CREATE table $tablename (id INT UNSIGNED NOT NULL
AUTO_INCREMENT PRIMARY KEY, firstname TEXT, lastname TEXT, emailaddress
TEXT, )";
this w
hello,
I think the following may solve your problem.
alter table patients change id id mediumint (9) default 0 not null primary
key auto_increment;
On Thu, 17 Jan 2002, Phil Schwarzmann wrote:
> I have an exsisting table without any rows. I tried to add a new column
> to it and make it an "a
Try...
ALTER TABLE patients CHANGE id id MEDIUMINT not null primary key
AUTO_INCREMENT
/dkm
- Original Message -
From: "Phil Schwarzmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 17, 2002 12:35 PM
Subject: [PHP] AUTO_INCREMENT problems
I have an exsisting table without any rows. I tried to add a new column
to it and make it an "auto increment" column. But when I do I get
this...
ALTER TABLE patients CHANGE id id MEDIUMINT (9) DEFAULT not null
AUTO_INCREMENT
MySQL said: You have an error in your SQL syntax near '' at line
I don't know why your query isn't working, but why aren't you using
phpMyAdmin's add field section?
Browse the tables definition page, and underneath the column descriptsion,
is a line that says Add new fields [textbox: #][popup:At End of
Database][button: Go]
That brings up a fully functional c
> -Original Message-
> From: Plutarck [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 06, 2001 10:35 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] AUTO_INCREMENT with MySQL & phpmyadmin
>
>
> At first I thought this might be better suited on the mysql l
At first I thought this might be better suited on the mysql list, but since
I'm using phpmyadmin I thought it better to ask here.
My problem is I can't figure out how to create a column with the
auto_increment attribute. I want to make one called userid whose value is
one higher than the highest
16 matches
Mail list logo