[PHP-DB] mssql support on Linux (PHP 4.0.6)

2001-11-22 Thread Gustavo Carreno

Hi there!

I'm baffled!!!
The extension code for mssql support resides on ext/mssql/php_mssql.*
The file EXTENSIONS states that it's working for both Unix and Windows 32.
There is no --with-mssql option on configure.

How am I suposed to get this working on Linux ???
Is it included in some other extension that I'm not getting ???

Thanks in advance !!

--
Gustavo Carreno
System Administrator  Web Programmer
Fábrica Digital



-- 
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/MSQL/HTML and Javascript

2001-11-22 Thread Jason G.

I don't know much about javascript, but I would do the following:

1. Figure out what javascript data structure you are going to use to hold 
the data.
2. Figure out exactly how it should be coded.
3. Simply write your PHP script to output your javascript as in 2.

The hard part of the matter (which is not very hard) is to figure out how 
to do the javascript.  Create a static page on your local hard drive with 
hard coded javascript data structures.  When you figure out how to do it 
like that, then add the PHP to generate the page in that format.

By the way, I am going to soon need to do something similar - where the 
user gives several inputs in a row, and then the data is packed and posted 
to a php script - which outputs another batch of questions.  If you are 
running a slow connection, or the server is loaded, then having to reload the
page each time you type a word or two could get quite frustrating.  So, let 
me know what you come up with if you have the time.

-Jason Garber
IonZoft.com

At 10:29 AM 11/22/2001 +0100, [EMAIL PROTECTED] wrote:
Hi, out there
Has anybody found a way to pass variables between javascript and php?
Here's what I want to achieve:
1.  I want to display a mysql_query result record-by-record
(first/prev/next/last buttons) without re-querying.
2.  I want to use a static html-form and plug the data into input
name=field_# type=text value=
 via event triggers
onclick=this.form.elements[field#].value=queryresult_for_field#
3.  I read the query result into an php-array and want to pass
array_values[1-n][1-m] to query_result_for_field
4.  Obviously, I can increase/decrease values of javascript
variables
 Obviously, there's a php array and I can set I php-array-counter
 BUT: I can't achieve to pass either value to the other
5.  I know, that php parses html first and then comes javascript,
but the array is there and I can use the java-
 script to place anything into this.form.elements[field#].value
6,  The whole thing is about NOT reload/refresh the page/re-query
but placing values via javascript.objects
 and triggers into an otherwise static forms-fill-in
Has anybody got a clue on that or is it really simply not possible due
to 5 above?
regards
Dietmar


-- 
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] New to PHP and MySQL!!!

2001-11-22 Thread Oli Wilkinson

Hello all,

I'm new to this database stuff  - I'm looking to create a simple database in
MySQL for a news page.

Just want the date of the input and the text for each entry!

Not too hard! But I'm a complete novice!!!

I am using Dreamweaver UltraDev (and the PHP extension).

Many Thanks

Oli Wilkinson



-- 
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] Combination of SQL statements invalid in MySQL?

2001-11-22 Thread Andy

Hi there,

I am trying to do a combination of SQL statements like described in a SQL
bóok. Is it possible, that mysql does not allow this syntax?

Thanx Andy

Error:

Occured during executing DELETE FROM test_user_interests WHERE user_id =
(SELECT user_id FROM test_user WHERE user_name = 'herbert01') statement

Error: 1064 You have an error in your SQL syntax near 'SELECT user_id FROM
test_user WHERE user_name = 'herbert01') ' at line 3



-- 
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] Re: New to PHP and MySQL!!!

2001-11-22 Thread koelwebdesign

please do yourself a big favor and look at the mysql website.
www.mysql.com
there you'll find how to do it and much more.
btw. the manual comes with mysql when you download it.
read it and you'll soon be addicted.

or something like (on win98)

cd mysql\bin
mysqladmin -u root create binary_data

mysql -u root database  mydb.dump

mydb.dump =
CREATE TABLE news (id INT(4) NOT NULL AUTO_INCREMENT PRIMARY KEY, head
CHAR(100), date CHAR(10), txt TEXT, pic CHAR(100));

this is very sketchy but I hope this will put you in the right direction.


Leo Kuiper

Building a map in order to find what's not lost but left behind.
 - Beth Orton


- Original Message -
From: Oli Wilkinson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 22, 2001 5:07 PM
Subject: Re: [PHP-DB] Re: New to PHP and MySQL!!!


 Many Thanks for that! It was very informative.

 However, I'm also looking for the code for the MySQL database! I'm not
sure
 how to do it properly! I basicaly need a table with two rows - one for the
 date and the other for the text in the news item.

 Cheers

 Oli Wilkinson
 George [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
 Oli,
 
  You may wish to visit www.udzone.com and have a look through
a
  few of the tutorials on how to set up UD with PHP and the Phakt server
 model.
 
George
 



 --
 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] Ms SQL.

2001-11-22 Thread Bruno Gimenes Pereti

Matt,

I've never worked with mandrake. Does it have rpm? if yes try this, in a
redhat I have php with mysql support I get this output:

# rpm -qa | grep php
php-4.0.4pl1-9
php-manual-4.0.4pl1-9
php-mysql-4.0.4pl1-9

probably there is a packet manager in mandrake, try it.

I think this is getting off-topic, let's continue in pvt. When we get the
solution you can send it back to the list.

Bruno.

- Original Message -
From: Matt Lemon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 22, 2001 2:30 PM
Subject: Re: [PHP-DB] Ms SQL.


 Bruno,

 I installed mandrake and the PHP support was built in so I guess that it's
 a recompile.  How do I do that ?

 Matt


 Bruno Gimenes Pereti wrote:

  Hi matthew,Bruno Gimenes Pereti wrote:

  Hi matthew,
 
  you probably don't have the file php_mssql.so in your extension dir, do
  you?
 
  2 options:
  - compile php with mssql support (might be ./configure --with-mssql ...)
  or - if you installed from packet (rpm for example) you can install the
  packet for mssql (it should be something like php_mssql.version.rpm)
 
  Bruno Gimenes Pereti.
 
  - Original Message -
  From: Matt Lemon [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, November 22, 2001 3:08 PM
  Subject: [PHP-DB] Ms SQL.
 
 
  I'm trying to get my linux server to connect to an MS SQL server via
php.
  If I run the same script on my windows laptop there is no problem but
on
  the Linux server I get the message :
 
  Fatal error: Call to undefined function: mssql_connect() in
  /var/www/html/stationary/index.php on line 49
 
  I edited /etc/php.ini and uncommented the line that loads the mssql
  module,
  it reads :
 
  extension = php_mssql.so
 
  Phpinfo() doesn't say that the SQL support is enabled and I still get
the
  error.
 
  Please help !
 
  --
  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]

 
  you probably don't have the file php_mssql.so in your extension dir, do
  you?
 
  2 options:
  - compile php with mssql support (might be ./configure --with-mssql ...)
  or - if you installed from packet (rpm for example) you can install the
  packet for mssql (it should be something like php_mssql.version.rpm)
 
  Bruno Gimenes Pereti.
 
  - Original Message -
  From: Matt Lemon [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, November 22, 2001 3:08 PM
  Subject: [PHP-DB] Ms SQL.
 
 
  I'm trying to get my linux server to connect to an MS SQL server via
php.
  If I run the same script on my windows laptop there is no problem but
on
  the Linux server I get the message :
 
  Fatal error: Call to undefined function: mssql_connect() in
  /var/www/html/stationary/index.php on line 49
 
  I edited /etc/php.ini and uncommented the line that loads the mssql
  module,
  it reads :
 
  extension = php_mssql.so
 
  Phpinfo() doesn't say that the SQL support is enabled and I still get
the
  error.
 
  Please help !
 
  --
  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-DB] Re: Combination of SQL statements invalid in MySQL?

2001-11-22 Thread Fred

Something similar is available using a FROM clause instead of a SELECT
clause, but it is only available in mysql 4.0.

Fred

Andy [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi there,

 I am trying to do a combination of SQL statements like described in a SQL
 bóok. Is it possible, that mysql does not allow this syntax?

 Thanx Andy

 Error:

 Occured during executing DELETE FROM test_user_interests WHERE user_id =
 (SELECT user_id FROM test_user WHERE user_name = 'herbert01') statement

 Error: 1064 You have an error in your SQL syntax near 'SELECT user_id FROM
 test_user WHERE user_name = 'herbert01') ' at line 3





-- 
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] Flushing PHP output

2001-11-22 Thread Neil Lathwood

Hi Folks,

What I am trying to accomplish is:

I want to have a web page access a number of DB's, this will start with one
but on a monthly basis increment by one. So within 12 months their will be
12 DB's. The web page will access each one in turn starting with the newest
DB and search through this for certain text. After a query has ended it
moves on to the next and so on.

I want the PHP page to output html in the lines of:

Scanning DB mm/

No results / Results depending on what it finds.

flush output so user can see if it has found what he is looking for

Scanning DB mm/

Etc.

I hope this explains what I am trying to do. Any pointers would be great.

Thanks in advance

Neil


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




Fw: [PHP-DB] Flushing PHP output

2001-11-22 Thread koelwebdesign




Leo Kuiper

Building a map in order to find what's not lost but left behind.
 - Beth Orton


- Original Message -
From: koelwebdesign [EMAIL PROTECTED]
To: Neil Lathwood [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, November 22, 2001 7:47 PM
Subject: Re: [PHP-DB] Flushing PHP output


 http://www.php.net/manual/en/function.date.php
 this maybe a good starting point?

 Leo Kuiper

 Building a map in order to find what's not lost but left behind.
  - Beth Orton


 - Original Message -
 From: Neil Lathwood [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, November 22, 2001 6:58 PM
 Subject: [PHP-DB] Flushing PHP output


  Hi Folks,
 
  What I am trying to accomplish is:
 
  I want to have a web page access a number of DB's, this will start with
 one
  but on a monthly basis increment by one. So within 12 months their will
be
  12 DB's. The web page will access each one in turn starting with the
 newest
  DB and search through this for certain text. After a query has ended it
  moves on to the next and so on.
 
  I want the PHP page to output html in the lines of:
 
  Scanning DB mm/
 
  No results / Results depending on what it finds.
 
  flush output so user can see if it has found what he is looking for
 
  Scanning DB mm/
 
  Etc.
 
  I hope this explains what I am trying to do. Any pointers would be
great.
 
  Thanks in advance
 
  Neil
 
 
  --
  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-oracle

2001-11-22 Thread Lilian Salazar

Hi,

  I am working with PHP and Oracle, with the functions of library OCI,
  and I need to handle the transaccionalidad in PHP, not at level of
  Stored procedures. 
  Somebody knows if exists the equivalence (or the form to make this
  equivalence), of the function ora_commitoff($conn)? (in OCI)
  The idea is to occupy this equivalence (or function), to execute a
  Stored procedure and to be able to make a Rollback at PHP level if
  it is that it is necessary. 
  Thank you very much for your help :o)

-- 
Saludos,
 Lilian  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]




Re: [PHP-DB] Combination of SQL statements invalid in MySQL?

2001-11-22 Thread Paul DuBois

At 4:08 PM +0100 11/22/01, Andy wrote:
Hi there,

I am trying to do a combination of SQL statements like described in a SQL
bÛok. Is it possible, that mysql does not allow this syntax?

According to the MySQL Reference Manual, subselects are not supported.


Thanx Andy

Error:

Occured during executing DELETE FROM test_user_interests WHERE user_id =
(SELECT user_id FROM test_user WHERE user_name = 'herbert01') statement

Error: 1064 You have an error in your SQL syntax near 'SELECT user_id FROM
test_user WHERE user_name = 'herbert01') ' at line 3

--
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] Result is not empty

2001-11-22 Thread Paul DuBois

Take out the while statement--
i.e. simply use:

$row = mysql_fetch_array($result);

the way you have things constructed now, the while statement 
evaluates true on the first iteration and $row equals the result row 
from the query. Because the while returned true, it is evaluated a 
second time, returns false, and $row = NULL.

-ib

Why would that matter?  He still sets the column variables on the first
iteration?  Yes, he needs no while loop, but the variables that are
set inside the loop should remain set after the loop terminates.



Kevin Schaaps wrote:

Greetings once again,

Today I hope to have a challenge for you. :)

I've created a query which returns 1 record. This is confirmed when testing
it in MySQL itself.
Now PHP sees that there is 1 record in the result, but is completely
unwilling to show the information.
The css responsible for that page does not change the color of the text so
it should (like all the rest of the page is) be visible.

Please help :)

Yours,

Kevin


$query = SELECT concat(rank_tbl.abbreviation, ' ', character_tbl.name, ' ',
character_tbl.surname) as CO,
   character_tbl.ircnick, character_tbl.email  FROM
character_tbl, rank_tbl, sim_tbl WHERE sim_tbl.co = character_tbl.id
   AND character_tbl.rank = rank_tbl.id AND sim_tbl.co =
character_tbl.id AND  character_tbl.rank  = rank_tbl.id
   AND sim_tbl.id = $sim_id;

 $result =   mysql_query($query);
 $num_rows   =   mysql_num_rows($result);

 if ($num_rows == 1)
 {
 while ($row = mysql_fetch_array($result));
 {
 $co =   $row[CO];
 $nick   =   $row[ircnick];
 $email  =   $row[email];
 };
 echo 
 table
 tr
 td width=\50\/td
 td width=\125\CO:td
 tda href=\$email\$co/a/td
 /tr
 tr
 td width=\50\/td
 td width=\125\IRC NICKtd
 td$nick/td
 /tr
 tr
 td width=\50\/td
 td width=\125\td
 td/td
 /tr
 /table;
 }
 else
 {
 echo br p class=\medium\No Commanding Officer assigned to
$name/p;
 };


-- 
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] Problem with Oracle connection

2001-11-22 Thread Jonathan B. Bayer

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello php-db,

We have a RedHat 7.1 server with a stock install.  I recompiled PHP from
the source RPM in order to add oracle support.

It mostly works, but we are having a problem where it apparently
randomly loses the connection to the database.  It is an oracle database
which is on the local network;  another system (a Sun) doesn't have this
problem, so that rules out the database.

Does anybody have any experience with this happening?


Thanks in advance.


JBB

 Jonathan B. Bayer  mailto:[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (MingW32)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjv9o84ACgkQxQhxe/20cF7uKACeJnvCCfH+rvjn9ePbJvpSWFec
X0QAn2WjXEuTu6V5gD4kq/s64RL6ovdp
=09F5
-END PGP SIGNATURE-


-- 
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] Flushing PHP output

2001-11-22 Thread Beau Lebens

if you just echo() the results/messages as you come across them, the page
should incrementally load.

in my experience (IE5?) if there is data being added to the page, then the
browser will display what it can, and keep adding to it until the stream
breaks or it finishes. one thing to note is that you wouldn't be able to do
any tables because they don't display until the code all the way to the end
of the table is available.

HTH

/beau

// -Original Message-
// From: Neil Lathwood [mailto:[EMAIL PROTECTED]]
// Sent: Friday, 23 November 2001 1:59 AM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] Flushing PHP output
// 
// 
// Hi Folks,
// 
// What I am trying to accomplish is:
// 
// I want to have a web page access a number of DB's, this will 
// start with one
// but on a monthly basis increment by one. So within 12 months 
// their will be
// 12 DB's. The web page will access each one in turn starting 
// with the newest
// DB and search through this for certain text. After a query 
// has ended it
// moves on to the next and so on.
// 
// I want the PHP page to output html in the lines of:
// 
// Scanning DB mm/
// 
// No results / Results depending on what it finds.
// 
// flush output so user can see if it has found what he is looking for
// 
// Scanning DB mm/
// 
// Etc.
// 
// I hope this explains what I am trying to do. Any pointers 
// would be great.
// 
// Thanks in advance
// 
// Neil
// 
// 
// -- 
// 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] Result is not empty

2001-11-22 Thread Indioblanco

yes, of course you're right-- gotta stop working so late... the use of 
the while statement where it wasn't needed threw me off, I guess.

Paul DuBois wrote:

 Take out the while statement--
 i.e. simply use:
 
 $row = mysql_fetch_array($result);
 
 the way you have things constructed now, the while statement 
 evaluates true on the first iteration and $row equals the result row 
 from the query. Because the while returned true, it is evaluated a 
 second time, returns false, and $row = NULL.
 
 -ib
 
 
 Why would that matter?  He still sets the column variables on the first
 iteration?  Yes, he needs no while loop, but the variables that are
 set inside the loop should remain set after the loop terminates.
 
 
 
 Kevin Schaaps wrote:
 
 Greetings once again,
 
 Today I hope to have a challenge for you. :)
 
 I've created a query which returns 1 record. This is confirmed when 
 testing
 it in MySQL itself.
 Now PHP sees that there is 1 record in the result, but is completely
 unwilling to show the information.
 The css responsible for that page does not change the color of the 
 text so
 it should (like all the rest of the page is) be visible.
 
 Please help :)
 
 Yours,
 
 Kevin
 
 
 $query = SELECT concat(rank_tbl.abbreviation, ' ', 
 character_tbl.name, ' ',
 character_tbl.surname) as CO,
   character_tbl.ircnick, character_tbl.email  FROM
 character_tbl, rank_tbl, sim_tbl WHERE sim_tbl.co = character_tbl.id
   AND character_tbl.rank = rank_tbl.id AND sim_tbl.co =
 character_tbl.id AND  character_tbl.rank  = rank_tbl.id
   AND sim_tbl.id = $sim_id;
 
 $result =   mysql_query($query);
 $num_rows   =   mysql_num_rows($result);
 
 if ($num_rows == 1)
 {
 while ($row = mysql_fetch_array($result));
 {
 $co =   $row[CO];
 $nick   =   $row[ircnick];
 $email  =   $row[email];
 };
 echo 
 table
 tr
 td width=\50\/td
 td width=\125\CO:td
 tda href=\$email\$co/a/td
 /tr
 tr
 td width=\50\/td
 td width=\125\IRC NICKtd
 td$nick/td
 /tr
 tr
 td width=\50\/td
 td width=\125\td
 td/td
 /tr
 /table;
 }
 else
 {
 echo br p class=\medium\No Commanding Officer 
 assigned to
 $name/p;
 };
 
 
 
 
 
 


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