Re: [PHP-DB] How to back up database..... ?

2001-04-17 Thread Xsarus Internetdiensten

mysqldump...

- Original Message -
From: "E K L" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, April 15, 2001 9:40 AM
Subject: [PHP-DB] How to back up database. ?


 Hi all,
Is there anyone can tell me how to back up Mysql database from one
server
 to other server? Please advisethanks
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


 --
 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]



-- 
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]




[PHP-DB] Supplied argument is not a valid MySQL result resource...

2001-04-17 Thread Klaus Haberkorn

Installation Details:
SuSE Linux 7.1 kernel 2.4 + apache 1.3.14 + php4.0.4pl1-1 + mysql 3.23.30-2

The following error message appears:
"Warning: Supplied argument is not a valid MySQL result resource in
/www/wp/php/login.php on line 29"

Remarks:
php4 runs fine and returns "not FALSE" for function mysql_db_query (means
query is ok) or mysql_query.
But the result of the query causes the error above. Any other function using
the query-result does so also.
The same php-script runs fine on other systems with the same environment.
The Access-Rights are completely "open" for the whole development site and
all of the mysql-users have
full access, there are only a few test-records in the table (no question of
size!).

Can anybody help us with this problem?
Thanks in Advance
Klaus
([EMAIL PROTECTED] and/or [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 administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Supplied argument is not a valid MySQL result resource...

2001-04-17 Thread Johannes Janson

Hi,

you usually get the error if your query is wrong and
you try to call mysql_fetch_array in a while loop.

It's easier if you post the relevant lines of code but
I'd say there is something wrong with your query.

Johannes


""Klaus Haberkorn"" [EMAIL PROTECTED] schrieb im Newsbeitrag
9bh369$d2h$[EMAIL PROTECTED]">news:9bh369$d2h$[EMAIL PROTECTED]...
 Installation Details:
 SuSE Linux 7.1 kernel 2.4 + apache 1.3.14 + php4.0.4pl1-1 + mysql
3.23.30-2

 The following error message appears:
 "Warning: Supplied argument is not a valid MySQL result resource in
 /www/wp/php/login.php on line 29"

 Remarks:
 php4 runs fine and returns "not FALSE" for function mysql_db_query (means
 query is ok) or mysql_query.
 But the result of the query causes the error above. Any other function
using
 the query-result does so also.
 The same php-script runs fine on other systems with the same environment.
 The Access-Rights are completely "open" for the whole development site and
 all of the mysql-users have
 full access, there are only a few test-records in the table (no question
of
 size!).

 Can anybody help us with this problem?
 Thanks in Advance
 Klaus
 ([EMAIL PROTECTED] and/or [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 administrators, e-mail: [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 administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] A bit of help with a query needed.

2001-04-17 Thread Johannes Janson

Hi,

which part is not working? Put a "or die(mysql_error())" behind your
queries to see which one produces an error.

like this:  $result = mysql_query("SELECT * FROM ships ORDER BY ship",$db)
or die(mysql_error());

 while ($row = mysql_fetch_array($result)) {

 If ($result) {
 $id = $row["id"];

you should put this the other way round that is the if before the while.
If($result) will always be "true"
within the while-loop.


 While ($result) {

you don't need another while here. Leave it out.

  $result2 = mysql_query("SELECT * FROM convicts WHERE
 convicts.ship = $id ORDER BY convict",$db);

put '' around the $id thus: WHERE convicts.ship='$id'...; // you don't
neccesarily need the
convicts before your columns name. There is no possible ambuguity.

 $row2 = mysql_fetch_array($result2)
  $id = $row2["id"];
 $convict = $row2["convict"];
 $ref = $row2["ref"];
 $contact = $row2["contact"];

In your original code you don'T do anything with $id, $ref or $contact. I
guess
that is just left out ;-)

Keep on asking.
Cheers
Johannes





-- 
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]




[PHP-DB] What causes error 127 from table handler

2001-04-17 Thread Jens Kisters

Hi there, i got an error message

got error 127 from table handler

Last time i got that i lost a few rows in the affected table, but i
thought that resulted from copying the db-files without shutting down
the database, but the system i got the message from this time never had
operations like this done on it, the tables belong to the same
application, so what could i have done in php (PHP4.04 pl1)  that
introduced this error?

The application does nothing fancy, just some basic operations.
The tables have a few keys on them.

the mysql versions are
MySQL 3.23.32-log
and MySQL 3.23.35-log
no special features like transactions or so

--
Gre aus dem schnen Kleve
Jens Kisters

rosomm et partner
Agentur fr neue Medien GmbH
Dienstleistungszentrum am
Weien Tor - Eingang B
Gocher Landstrasse 2
47551 Kleve / Bedburg-Hau

Telefon: 02821 - 97856-20
Telefax: 02821 - 97856-77
[EMAIL PROTECTED]
http://www.rosomm-partner.de



--
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]




Re: [PHP-DB] Supplied argument is not a valid MySQL result resource...

2001-04-17 Thread Klaus Haberkorn

thank You, Johannes,
but I think we can skip this,
we reduced the query statement to the most simple one:
"SELECT * FROM {tablename}"
if the tablename is wrong, then another error message is issued.
the result is not treated by a while-loop but just by fetch_num_rows,
which at least reports the error.
(and, by the way, the same script runs on another system)
so we are more looking for problems with apache versions
and/or modules.
we also checked access-rights, but this also causes different errors.
any other idea?

""Johannes Janson"" [EMAIL PROTECTED] schrieb im Newsbeitrag
9bh6jh$346$[EMAIL PROTECTED]">news:9bh6jh$346$[EMAIL PROTECTED]...
 Hi,

 you usually get the error if your query is wrong and
 you try to call mysql_fetch_array in a while loop.

 It's easier if you post the relevant lines of code but
 I'd say there is something wrong with your query.

 Johannes


 ""Klaus Haberkorn"" [EMAIL PROTECTED] schrieb im Newsbeitrag
 9bh369$d2h$[EMAIL PROTECTED]">news:9bh369$d2h$[EMAIL PROTECTED]...
  Installation Details:
  SuSE Linux 7.1 kernel 2.4 + apache 1.3.14 + php4.0.4pl1-1 + mysql
 3.23.30-2
 
  The following error message appears:
  "Warning: Supplied argument is not a valid MySQL result resource in
  /www/wp/php/login.php on line 29"
 
  Remarks:
  php4 runs fine and returns "not FALSE" for function mysql_db_query
(means
  query is ok) or mysql_query.
  But the result of the query causes the error above. Any other function
 using
  the query-result does so also.
  The same php-script runs fine on other systems with the same
environment.
  The Access-Rights are completely "open" for the whole development site
and
  all of the mysql-users have
  full access, there are only a few test-records in the table (no question
 of
  size!).
 
  Can anybody help us with this problem?
  Thanks in Advance
  Klaus
  ([EMAIL PROTECTED] and/or [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 administrators, e-mail: [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 administrators, e-mail: [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 administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Supplied argument is not a valid MySQL result resource...

2001-04-17 Thread Johannes Janson

Hi,

i don't get that.
Examlpe: tablename: test , entry: id 001; name: John Doe

$result = mysql_query("SELECT * FROM test");
$row = mysql_fetch_whatever($result); // everything ok


$result = mysql_query("SELECT * FROM tet");
$row = mysql_fetch_wahtever($result); // Warning: Supplied arggument is not
a valid 

$result = mysql_query("SELECT nonexistent FROM test");
$row = mysql_fetch_whatever($result); // Warning: Supplied argument is not


$result = mysql_query("SELECT * FROM test WHERE id='002'");
$row = mysql_fetch_whatever($result); // no errormsg, $result=true but empty

That's what I get. So there must be something wrong with the query.

Johannes


""Klaus Haberkorn"" [EMAIL PROTECTED] schrieb im Newsbeitrag
9bhh1c$2gg$[EMAIL PROTECTED]">news:9bhh1c$2gg$[EMAIL PROTECTED]...
 thank You, Johannes,
 but I think we can skip this,
 we reduced the query statement to the most simple one:
 "SELECT * FROM {tablename}"
 if the tablename is wrong, then another error message is issued.
 the result is not treated by a while-loop but just by fetch_num_rows,
 which at least reports the error.
 (and, by the way, the same script runs on another system)
 so we are more looking for problems with apache versions
 and/or modules.
 we also checked access-rights, but this also causes different errors.
 any other idea?





-- 
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]




Re: [PHP-DB] Error messge regarding session variables

2001-04-17 Thread Johannes Janson

Hi,

cookies are sent as header information. This means you can't send
any output (html-tag, whitespaces before ?php) at all before
sending cookie/header information.
As your error message tells you the output already started in line 4.
Move the cookie-part from line 6 to the beginning and it should
work.

Johannes

"Dan Guja" [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 i've got error message when i put some session variables on my pagge:

 Warning: Cannot send session cookie - headers already sent by (output
started at
/home/httpd/vhosts/coliba.freephp.digiro.net/htdocs/user/index.php:4) in
/home/httpd/vhosts/coliba.freephp.digiro.net/htdocs/user/index.php on line 6

  Anyone can expline me whta does it mean?



 --
 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]




-- 
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]




RE: [PHP-DB] A bit of help with a query needed.

2001-04-17 Thread Howard Picken

Thanks for that.  I've cleaned up things a bit for the time being.

I'm still getting an error though.

Parse error: parse error in c:\usr\local\www\pages/ships.php on line 30

Line 30 turns out to be  $convict = $row["convict"];  so I'm assuming that
it's having trouble with the array. I've tried changing $row to $row2 to no
avail.
That also why I had the rest of the convicts fields in the first place (but
didn't
display then).

When I originally played with this I used a Left Join between the two tables
and it all
worked accept only one convict was returned for each ship and ship's were
listed more than once
if there were more than one convict on the ship (of course).

Anyway here is the cleaned up code.

?php

$db = mysql_connect("localhost", "root");

mysql_select_db("convicts",$db);

$result = mysql_query("SELECT * FROM ships ORDER BY ship",$db) or
die(mysql_error());

If ($result) {

while ($row = mysql_fetch_array($result)) {

$id = $row["id"];
$ship = $row["ship"];
$voyage = $row["voyage"];
$sex = $row["sex"];
$year = $row["year"];

echo "font size=\"3\"b$ship/b/fontbr
 font size=\"2\"$voyage/fontbr
 font size=\"2\"$sex/fontbr
 font size=\"2\"$year/fontp\n";

 $result2 = mysql_query("SELECT * FROM convicts WHERE ship =
'$id' ORDER BY convict",$db);
 $row = mysql_fetch_array($result2)
 $convict = $row["convict"];

 echo "font size=\"3\"$convict/fontbr\n";

}

} Else {
 echo "font color=\"#FF\"bSorry no records for that
letter/b/font\n";
   }
}

?


-- 
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]




Re: [PHP-DB] A bit of help with a query needed.

2001-04-17 Thread Johannes Janson

Hi,

  $result2 = mysql_query("SELECT * FROM convicts WHERE ship =
 '$id' ORDER BY convict",$db);
 $row = mysql_fetch_array($result2) // ! you are missing a ";"
this is where you get the parse error from!

 --
 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]




-- 
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]




[PHP-DB] PHP + Interbase

2001-04-17 Thread bnunez


Quiero instalar PHP con apache en linux y conectarme a un
servidor interbase
corriendo en solaris. Ya tengo php, que mas necesito para
"activar" la conexion a
interbase?.

I have a database in solaris (in interbase) and I need to conect to
that database. Now there is installed PHP in linux with apache.
How I heve to do to configure PHP to conect to that database?.
What more I need? (interbase client software, a new module).

Ruben,


Bienvenido Rubn Nez Riveros [EMAIL PROTECTED]
Centro Nacional de Computacin - CNC
San Lorenzo - Paraguay
Tel.: 585-619, 585-550


--
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]




Re: [PHP-DB] PHP + Interbase

2001-04-17 Thread Johannes Janson

Hi,

check the relevant configure-flag for interbase.
most likely to be something like --with-interbase.
just type ./configure --help |more and you'll get
a lng list of options.

Johannes

[EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

Quiero instalar PHP con apache en linux y conectarme a un
servidor interbase
corriendo en solaris. Ya tengo php, que mas necesito para
"activar" la conexion a
interbase?.

I have a database in solaris (in interbase) and I need to conect to
that database. Now there is installed PHP in linux with apache.
How I heve to do to configure PHP to conect to that database?.
What more I need? (interbase client software, a new module).

Ruben,


Bienvenido Rubén Núñez Riveros [EMAIL PROTECTED]
Centro Nacional de Computación - CNC
San Lorenzo - Paraguay
Tel.: 585-619, 585-550


--
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]




-- 
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]




Re: [PHP-DB] php with mysql or interebase?

2001-04-17 Thread Doug Semig

[In a deadpan voice...] Oh, what a fascinating twist.  

http://marc.theaimsgroup.com/?l=php-db is where this particular list is
archived.

That's where you can learn a lot about the individual programs, and you may
find out little bits of wisdom like:  each database has strengths and
weaknesses, you really should pick the platform based upon your needs, even
the best database will not help you if you start with a poorly designed
schema.

Doug

At 02:33 PM 4/17/01 -0400, [EMAIL PROTECTED] wrote:
I'm trying to decide whether to use interbase or mysql with php.
Both are free and both have a php api.

So with is better to use with php?
Or does it matter?

[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 administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] really more of an oracle question

2001-04-17 Thread Brian.J.Mauter

Hey everyone, please disregard this off-topic question.  I think I may
need some PHP knowledge too, but here goes.

In all of the documentation I've found, a DBA can write stored
procedures, functions and views.  I know how to write a stored procedure
to do INSERT, UPDATE or DELETE functions.  I really want to be able to
store queries in Oracle just as you would an INSERT.

For example, I want to have a SP do this:

SELECT  FLGT_NUMBER, DPTR_ARPT, ARVL_ARPT
FROMFLIGHT
WHERE   FLGT_NUM = $flgt_num
ORDER BYFLGT_NUM;

I need the entire recordset returned so that I can call the SP from PHP.
This almost sounds like making a view, but I don't know how to send
parameters to the view.

I really don't know a lot about Oracle and quite frankly the Oracle
documentation I've found sucks.

Can anyone help me?  Would anyone be so kind as to tell me what their
favorite Oracle resource is?  I've tried www.oracle.com and www.orafaq.com
but neither has helped me find what I'm looking for.  It's too bad Google
took over Deja; I can't post there.  My university's news server is far
from being called "maintained" and I have no other decent news server at
my disposal.

Pleading for help,


Brian Mauter
[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 administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] What PHP4 use for connection to MSSQL?

2001-04-17 Thread John Lim


""Frank M. Kromann"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 ODBC and ADO uses the same type of connection. In fact you need an ODBC
DSN to connect to a database using ADO.

Not quite true. ADO is designed so that it can use ODBC internally, or a
different technology called OLEDB. OLEDB is faster than ODBC. See the
benchmark link i gave below.


 The MSSQL functions in PHP uses a native communication with the database.
This communications is faster than using ODBC but it is not as easy moving
to other databases as it would be using ODBC, RDO or ADO (or whatever
Microsoft is adding on top of ODBC)

 - Frank

  For some examples of connecting PHP to ODBC, visit
  http://php.weblogs.com/odbc
 
  As to speed, definitely MSSQL using PHP is very fast. See some
benchmarks:
  http://php.weblogs.com/adodb_benchmarks
 
  Try the ADODB database wrapper library also. It's ADO for PHP!
  http://php.weblogs.com/adodb (I'm the author).
 
  Regards, John
 
  "Yevgeny Dyatlov" [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   Hello ,
  
 Can somebody help me with a question:
 ASP use for connection to MSSQL the OLE DB for SQL Server, someone
 tell that it's cool because it better  faster than ODBC. But in
 PHP4 there are functions both for ODBC  MSSQL. In FAQ on
 www.php.net - 'On Windows 95/NT machines, you can simply use the
 included ODBC support and the correct ODBC driver.'
 Please help! What it work in fact? And what (ASP or PHP) will faster
 work with MSSQL on WinNT with MS IIS?
  
   --
   Best regards,
Yevgeny  mailto:[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 administrators, e-mail:
[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 administrators, e-mail: [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 administrators, e-mail: [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 administrators, e-mail: [EMAIL PROTECTED]