Timothy:
Your code uses the out of place, try this and
compare it to what you have:
Edit Story:";
$sql = " SELECT * FROM story WHERE id='$id' ";
result = mysql_query($sql);
$myrow = mysql_fetch_array($result);
$id = $myrow['id'];
$title = $myrow['title'];
$body = $myrow['body'];
$myvar =
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 INFORMAT
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;
$default
I do the same and I think this is the only way
Bartek Pawlik
- Original Message -
From: Jordan Elver <[EMAIL PROTECTED]>
To: PHP Database Mailing List <[EMAIL PROTECTED]>; PHP General Mailing
List <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 1:00 PM
Subject: [PHP-DB] Best way to c
yes, I have full access rights. Using the same user and password (for
example) as I use when using phpMyAdmin and have no problems altering tables
with that.
Martin.
-Original Message-
From: IceCold [mailto:[EMAIL PROTECTED]]
Sent: 29 March 2001 13:18
To: Martin E. Koss
Subject: RE: [PHP
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
On Thu, Mar 29, 2001 at 02:25:42PM +0200, Hans-Werner Guth wrote:
> We do it this way (code snippet)
>
> Bartek Pawlik wrote:
> > ...snipp...
> > >
> > > I normally do something like:
You can do something like
---
if(mysql_query($sql))
{
success
}
else
{
error
}
---
Regard
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 i
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
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
f
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:
Yes, I have already done this, but it didn't work to.
I tried this:
putenv("ORACLE_SID=DPMM");
putenv("ORACLE_HOME=C:\orawin95");
putenv("TNS_ADMIN=C:\orawin95\NETWORK\ADMIN");
Thanks
Bruno.
__
O BOL é Top3 no iBest! Vot
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 b
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,
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 a
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 IngresII?)
Hi,
Use the OCI functions (see the html help) with the TNS like it is in your
tnsnames.ora file (C:\ORAWIN\NETWORK\ADMIN\TNSNAMES.ORA):
Bye
Carlos
> - Mensagem original -
> De: bgadelha [SMTP:[EMAIL PROTECTED]]
> Enviada em: Quinta-feira, 29 de Março de 2001 10:37
> -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
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 err
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 - c
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 a
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. A
> -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
Apparently there is nothing obviously wrong with the SQL. No-one else has
said that it is wrong. In fact a couple have said that it looks ok. One
thing is that if I echo $result to the screen I get nothing!
Martin.
-Original Message-
From: Walter Franssen [mailto:[EMAIL PROTECTED]]
Sent:
Ma'am, I seem to have come late to this thread, and I think you've
already chosen to go back to the multiple-table schema. I'm just
posting to say that I think you made the right decision.
If you have data that is structured in tree form, i.e. if you have
something along the lines of
*
On Thu, Mar 29, 2001 at 03:53:07PM +0100, Martin E. Koss wrote:
> 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 best way ...
regarding to what expectations?
The query doesn't succeed because...
- the host running the mysqldemon died?
- the mysqldemon died?
- your ISP died?
- the hard disk holding the database died?
- the disk holding the database run out of space?
- the disk holding the cache run out o
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
are fine, new column added.
However, via the PHP script we're discussi
On Thu, Mar 29, 2001 at 05:07:43PM +0200, Mirko Cegledi wrote:
> > I believe this is what you want:
> >
> > SELECT * FROM mydatabase LIMIT 0,5
>
> I'm for this for months now. But seems not to work with Oracle 8.0.5. Could
> anybody tell me how I get the first five rows of a table with oracle?
Hello Experts
Is there any way to detect/know weather u received any mails [at your server] or not
??..
Is there any method/way via php that whenever somebody sends mail to
me ..like at [EMAIL PROTECTED] i get a message via mail itself that u got mail prior
receiving the original mail.
Does i
Has someone know how to execute an external program with nt 2,000 iis 5.0 and
php4?
My code is:
And the error:
Warning: Unable to fork [c:\programmi\senalotto\prog.exe 11 11 11 11 11 11
pluto 6 6] in c:\programmi\senalotto\calcolo.php on line 19
prog.exe is a c compiled program running in sh
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 support
Hello,
"Martin E. Koss" wrote:
>
> 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 fi
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
3AC2FA65@tech-01">
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.
---
E3 Confirm News
E3 Confirm News Page
Make the necessary edits and the story will be considered "live
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
Yes -
Use the current date generated by php date functions in place of where you
would hardcode today's date.
Matt
-Original Message-
From: Mike Baerwolf [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 2:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] news manager
Hello,
I'm
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?
T
> 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 usual
How do you extract the complete text fields does MSSQL extension have
any text handling functions??
Sanjay
[EMAIL PROTECTED]
--
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 a
Greetings
I have a Red-Hat Linux 6.2 web server with Apache 1.3.9
and PHP3 (would like to move to PHP4 immediately),
and the database server is Windows NT4 & SQL Server 7.
I currently use the ODBC-ODBC-Bridge (OOB) by Easysoft.
It has worked great and they have great support.
But I'd like to kn
The article on PHP builder on the topic
http://www.phpbuilder.com/columns/alberto2919.php3
At 04:56 PM 3/29/2001 -0500, David L Jarvis wrote:
>Greetings
>
>I have a Red-Hat Linux 6.2 web server with Apache 1.3.9
>and PHP3 (would like to move to PHP4 immediately),
>and the database server is Wi
I am having a problem with losing a variables value. What I am doing is
taking the value from a database, 'customer_id', and putting it into a
hidden form value called 'customer'. When I hit submit on the form it sends
me to a page where it does several queries to several databases and pulls
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 scrip
There is a simple flash/php tutorial at
http://www.phpdeveloper.org/tutout.php?num=15
--
Regards,
Gary "SuperID" Huntress
===
FreeSQL.org offering free database hosting to developers
Visit http://superid.dyndns.org:8080/freesql/index.php
"Sh
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
On Thursday, March 29, 2001, at 08:32 AM, Nick Davies wrote:
> Doesn't the command return 1 or 0 in success or failure?
>
> You may not have a result
>
> Probably wrong but something like
>
> if (mysql_query($query)) {
>
> } else {
>
> }
What I understand is that the return from the query only
> 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 do this:
$result = mysql( $dbname, $query );
if(( $result ) && ( mysql_errno() == 0 )) {
// query was successful
Doesn't the command return 1 or 0 in success or failure?
You may not have a result
Probably wrong but something like
if (mysql_query($query)) {
} else {
}
or you could die out mysql_query($query) or die
On Thu, 29 Mar 2001, Boget, Chris wrote:
> > i was just wondering what you g
> Doesn't the command return 1 or 0 in success or failure?
Not 1 or 0. It returns 0 or some other value. Almost the same,
but not quite.
> You may not have a result
> Probably wrong but something like
> if (mysql_query($query)) {
> } else {
> }
> or you could die out mysql_query($query) or d
> 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 t
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 fu
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 fe
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;
And use the $some_number variable in that external.j
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 unsubsc
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 co
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 i
> -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 ($AddColQuery,
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
#---#
66 matches
Mail list logo