What is the best field type to use for an Auto_Increment field?
i am using int at the moment, is there a better one?
-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail: [EMAIL PROTECTED]
Web: http://www.intasept.com
"MAKING sense of
the
The correct question is if it's even possible to use a non integer field
with auto_increment with MySQL (assuming it's MySQL)
and the answer is : No. you must use an int type.
From the MySQL manual : "An integer column may have the additional attribute
AUTO_INCREMENT. ".
Sincerely
berber
I have been trying to get a new column added to a table (vips) via a PHP
script, but having exhausted all the things I can find, I'm still
struggling. I've referred t TFM for all those who just can't wait to tell me
to do so, and believe my SQL statement is correct:
$NewCol = $Prod_Code;
We do it this way (code snippet)
...
$dbqueryline = mysql_db_query ($mredatabase,
"select vorgang, bezeichnung
from mrebewkennz
order by vorgang", $dbhandle);
if (mysql_errno() != 0)
{
echo mysql_error(); echo "\n";
}
else
{
$bewkenznzahl = mysql_num_rows($dbqueryline);
print
Hello,
houston wrote:
I have to deal with displaying result sets that could potentially be quite
large. It would be bad form to drop 10,000 rows into a browser table so I
need a strategy for dealing with this possibility.
It's obviously not a big deal to limit the output but what is the
You can use the Serial Datatype if using Postgres.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hello,
"Martin E. Koss" wrote:
I have been trying to get a new column added to a table (vips) via a PHP
script, but having exhausted all the things I can find, I'm still
struggling. I've referred t TFM for all those who just can't wait to tell me
to do so, and believe my SQL statement is
Hi,
I'm having troubles using PHP+Oracle.
I´m under Win98, with Apache WebServer, PHP4 and Oracle.
When I try to connect, the following error message is
displayed:
Warning: Unable to connect to ORACLE (ORA-12154:
TNS:could not resolve service name) in
c:\apache\htdocs\testeoracle.php on line 24
I belive you have to set your sid and oracle_home before attempting to
ora_logon?
putenv("ORACLE_SID=your sid);
putenv("ORACLE_HOME=your oracle home);
if(ora_plogon("rascunho@dvfpmm","java"))
{ echo "conectou"; }
else
{ echo "falhou outra vez:".ora_error(); }")
-Original Message-
From:
While I appreciate your comments about metabase I simply don't have time to
start the project again, it has taken a long time to get this far. Perhaps
I'll look at metabase for future developments.
In the meantime, anyone seeing this message for the first time, I'm still
struggling with my code
On Thu, Mar 29, 2001 at 12:20:41PM +0100, Martin E. Koss wrote:
I have been trying to get a new column added to a table (vips) via a PHP
script, but having exhausted all the things I can find, I'm still
struggling. I've referred t TFM for all those who just can't wait to tell me
to do so, and
Have you tried supplying the optional third parameter to ociplogon() to
specify the connection?
ociplogon( "username","password","tns_alias");
--Houston
""bgadelha"" [EMAIL PROTECTED] wrote in message
Hi,
I'm having troubles using PHP+Oracle.
I´m under Win98, with Apache WebServer, PHP4
In his excellent book "Core PHP Programming", Leon Atkinson says that PHP
supports Perl-style "HERE docs". I have tried to make this work with
PHP4.04 with no success. I also haven't found any reference to HERE docs in
the PHP documentation. Is this really supported in PHP?
--
PHP Database
Where can I find user-level documentation for the DB database
abstraction layer in PEAR? The stuff on www.php.net pointed to from
http://pear.php.net/ seems to be aimed at developers and I'm not ready
for that yet (unless someone has saved me some work and has a working DB
component for
-Original Message-
From: houston [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 8:40 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] HERE doc
In his excellent book "Core PHP Programming", Leon Atkinson
says that PHP supports Perl-style "HERE docs". I have tried
to make
I did what you suggested and (exactly as it appears in the browser window)
here is what is sent to the screen:
ALTER TABLE vips ADD NewAD FLOAT (11,2) DEFAULT '0.00'
The new item (sent from the previous form) is added to the database but the
new column is NOT added to the other table, but no
Is the SQL statment correct. Don't is must be
ALTER TABLE vips ADD COLUMN $NewCol VARCHAR(50) NULL";
-Original Message-
From: Jason Stechschulte [mailto:[EMAIL PROTECTED]]
Sent: donderdag 29 maart 2001 16:29
To: Martin E. Koss
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] ALTER TABLE -
Hi!
I'm using PHP4, iODBC OpenLink for the database connection and
communication. After installing the iODBC (driver manager) OpenLink
(driver), fix up the odbc.ini (part of iODBC or OpenLink) and did the
odbctest. The test passed and it connect the linux to the MS-SQL Server and
I was
One more thing, could it be that it doesn't work with Caldera Linux??
Scott
""Scott Fletcher"" [EMAIL PROTECTED] wrote in message
99vijo$5uj$[EMAIL PROTECTED]">news:99vijo$5uj$[EMAIL PROTECTED]...
Hi!
I'm using PHP4, iODBC OpenLink for the database connection and
communication. After
-Original Message-
From: David Balatero [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 4:33 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Select Database number show it
I believe this is what you want:
SELECT * FROM mydatabase LIMIT 0,5
Hi!
I see you there's been lots of responses already, but there's an important
related bit of news folks might want to know.
Everyone who uses the mysql_affected_rows() should know that a bug was
fixed in 3.23.36 that evidentally reports affected rows incorrectly if
MySQL was compiled without
Hi,
well usually yuto_increment is used on ID fields.
then depending on how many rows your table has
tinyint (up to 255; 1k), smallint (up to 65535; 2k)
mediumint (up to 16777215; 3k) int (up to 4294967295, 4k).
Johannes
"Ben Cairns" [EMAIL PROTECTED] schrieb im Newsbeitrag
I have created a news script and to my dismay, the script is breaking when
there is a single quote - ' - in a form that goes to the database. Any
solutions?
The text of the script is below.
---
titleE3 Confirm News/title
html
font size=+2E3 Confirm News Page/fontp
Make the necessary edits and
Hello,
I'm working on a news manager and would like to display records for
today,yesterday,last week, last month and so on. This is what I have so far,
$result = mysql_query("SELECT * FROM news WHERE timestamp=010325",$db);
if ($myrow = mysql_fetch_array($result)) {
Is there a way to do
On Thu, Mar 29, 2001 at 05:31:39PM +0100, Martin E. Koss wrote:
I just pasted:
ALTER TABLE vips ADD NewAD FLOAT (11,2) DEFAULT '0.00' NULL
into the 'Run SQL' box on phpMyAdmin and it did exactly what it should do. I
did it both online (hosting servers) and offline on my Win/Apache and both
Hi,
I've compiled php before with --with-ibm-db2 to use DB2's CLI driver. Now
I'm working on NT with the php binary, and I can't figure out how to connect
to DB2 except with ODBC. I would prefer to use the CLI interface than an
ODBC interface. Is this possible or am I stuck with ODBC on NT?
By the way, I understand there are major issues with SQL2000 server. In
that case, ODBC might be a better choice.
Figures, that's the version we're using...
So what all is involved with getting ODBC to work. Also, in case this wasn't
obvious, I'm trying to connect from the PHP/Apache/Linux
Hi Daevid,
ODBC isn't that scary :) You bascially need to link a Driver Manager into
PHP so it can knows how to bind to the ODBC layer.
The Quick and Dirty instructions are
1. download the iODBC sdk from www.iodbc.org,
2. add --with-iodbc=/path/to/iodbc in to your configure
3. proceed as
On Thursday, March 29, 2001, at 04:58 PM, Scott Kalbach wrote:
I have the individual queries in include files. It does the first 2
queries
fine,but when it gets to the third, the value of $customer seems to be
gone,
so I get no result for the rest of the query's. I looked in my scripts
Hi,
i was just wondering what you guys do to check if a wquery suceeded or not?
I know about mysql_num_rows() and mysql_affected_rows(), just wondered what
you guys do?
I normally do something like:
$sql = "SELECT something FROM table";
$result = mysql_query($sql);
if(@mysql_num_rows($result)
What about:
$sql = "SELECT something FROM table";
$result = mysql_query($sql) or die ("Query failed!");
do_something(); //the query has succeeded if we get to this line
HTH
Jon
-Original Message-
From: Jordan Elver [mailto:[EMAIL PROTECTED]]
Sent: 29 March 2001 12:00
To: PHP Database
The Quick and Dirty instructions are
1. download the iODBC sdk from www.iodbc.org,
can you give me the EXACT URL's for EVERYTHING I need to download and
install re: ODBC
I have RedHat 6.2, (so glibc2)
2. add --with-iodbc=/path/to/iodbc in to your configure
I'm having difficulties with that
Hi,
If I were to try to connect to a MySQL DB from some scripting language,
in the connection string what do I put in the "provider=" string for
an ODBC connection?
I'd like to try this from an ASP application using ADO, but need to know
this. Before
you boo and hiss - I've duplicated the
Dunno without looking at code, but try storing the value of $customer into a
local variable when the script is invoked - something is wiping it clean.
my thunks,
Phil J.
Scott Kalbach wrote:
I am having a problem with losing a variables value. What I am doing is
taking the value from a
Chris - I think to use DB2's CLI interface, you need a compiled langauge, like
some flavor of C++ or VB. I've seen some examples using the CLI interface, so
my question is why on earth would you chose that over generic ODBC? That CLI is
nasty-looking,
pages of code versus what you can do in a
I've got 2000 pages that are dependent on one include and I don't wanna
alter it too much and I'd like to use some JS in a linked file. I don't
wanna include it in and have it displayed.
Is there a way to do:
$some_number = $mysql_num_rows;
link lanuguage="JavaScript" type="text/javascript"
Hello
What entry in the php.ini is required, if I would like to store and retrieve
all sessions form a mysql database. Presently session are written to the
/tmp folder as well.
session.save_handler
session.save_path
thanks
Roland
--
PHP Database Mailing List (http://www.php.net/)
To
hi,
Is there any good site for learning php and clibpdf?
I try using php manual and cannot get it working even I copy and paste the
code
thanks
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To
I think your only choices are to put this value into either a database or if
you are using
php4 - to use a session varible - or use a cookie if you are trying to
persist this value
across multiple pages for multiple users...or pass as a querystring to the
next page..
or as a hidden form variable
-Original Message-
From: Martin E. Koss [mailto:[EMAIL PROTECTED]]
Sent: 29 March 2001 15:32
To: Manuel Lemos; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] ALTER TABLE - code not working.
$AddColQuery = "ALTER TABLE vips ADD COLUMN $NewCol";
$result = mysql_query
Not too sure if this is what you want, if not - I'm sorry:
$some_number = $mysql_num_rows()
sizeof()
This counts the number of elements in an array..(Just wipped that outta
the open page in "PHP Fast and Easy"!)
Russ
#---#
41 matches
Mail list logo