[PHP-DB] VERY NEWBIE php_* mod_* --with-* question

2002-10-02 Thread Aleksandar

Hello List for the first time,
I am very new to php but impressed from what i've seen so far. I managed to 
configure php w/ mysql and db2 do some selects, inserts ... 
What I am inerested in is what are all those mod_php* and php_* on the 
distribution's CDs e.g. if they are installed how do i get support for 
which i thought i have installed the module( like rpm -i  
php-oracle-4.2.2-1j1.i686.rpm means that i can somehow get oracle support 
without recompiling php ??? or no). 
Another thing that bothers me is should I (can I) use for example Oracle's 
apache or install regular apache and work with it.
Is Apache-PHP-Linux on one machine and OracleDB-Win/Lin on another machine 
big trouble or peace of cake (It asks me for oci8 lib which I don't know 
where to get if I don't want to install any oracle products on the web 
server (can i get them from php-oci8...rpm for example)
DSO e.g. oracle.so is a shared object but where to include it for the 
support and is it enough)
Thank you all and looking forward to hearing from you 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] MySQL 4.x and PHP

2002-10-02 Thread Chris Hilbert

New MySQL is out I noticed (4.0.4).  Is there any way to make it work
correctly with PHP?  I haven't seen any modules for download or comments
about this issue.

I'm just wondering if there is some modifications I can make or if I'm just
stuck with MySQL 3.x until something new is released by the PHP guys.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Two sql queries

2002-10-02 Thread Bzdpltd

Hi there,

Wonder if someone could help me, I have not touched PHP in a while now so a little 
rusty.

What i have is a news page now the news story is disaplayed when someone clicks the 
item from the home page, which then loads a news page, but the problem I am having is 
when the news page loads it has the links down the left with the other news stories, 
all with the correct id numbers appended to the link, but the news item on the page is 
loading as the last one, and when you click the links it does not load the correct 
item.

Now I know this is something to do with having two sql queries on the same page, and 
the id number being fetched.

Here is the code for the two sql statements on the same page, if someone could help it 
would be most appreciated.

?
//start query code

$sql= SELECT * FROM news WHERE 'Corporate' = division ;
$sql_result = mysql_query($sql); 

if (mysql_num_rows($sql_result) ==0)
{
echo (  \n);
}
else {
while ($row = mysql_fetch_array($sql_result)){
  $title = $row[title];
  $id = $row[id];

echo (tr \n);
echo (td width=\13%\ class=\body\p /p/td \n);
echo (td width=\87%\pa href=\news.php?id=$id\$title/a/p/td 
\n);
echo (/tr \n);
}}

?

?
//start query code
  
$sql= SELECT * FROM news WHERE ('$id' = id) ;
$sql_result = mysql_query($sql); 

if (mysql_num_rows($sql_result) ==0)
{
echo (  \n);
}
else {
while ($row = mysql_fetch_array($sql_result)){
  $division = $row[division];
  $title = $row[title];
  $date = $row[date];
  $content = $row[content];
  $link = $row[link];

echo (h3$title/h3 \n);
echo (p . date ('F jS Y',strtotime($date)) .  /p \n);
echo (p$content/p \n);
echo (p /p \n);

}}
?

There is html code inbetween these two statements, and the id number is passed from 
the index page with the news item listed.

Hope someone can help me in the right direction.

Thanks

Barry Zimmermn

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Two sql queries

2002-10-02 Thread Bzdpltd

Hi there,

Wonder if someone could help me, I have not touched PHP in a while now so a little 
rusty.

What i have is a news page now the news story is disaplayed when someone clicks the 
item from the home page, which then loads a news page, but the problem I am having is 
when the news page loads it has the links down the left with the other news stories, 
all with the correct id numbers appended to the link, but the news item on the page is 
loading as the last one, and when you click the links it does not load the correct 
item.

Now I know this is something to do with having two sql queries on the same page, and 
the id number being fetched.

Here is the code for the two sql statements on the same page, if someone could help it 
would be most appreciated.

?
//start query code

$sql= SELECT * FROM news WHERE 'Corporate' = division ;
$sql_result = mysql_query($sql); 

if (mysql_num_rows($sql_result) ==0)
{
echo (  \n);
}
else {
while ($row = mysql_fetch_array($sql_result)){
  $title = $row[title];
  $id = $row[id];

echo (tr \n);
echo (td width=\13%\ class=\body\p /p/td \n);
echo (td width=\87%\pa href=\news.php?id=$id\$title/a/p/td 
\n);
echo (/tr \n);
}}

?

?
//start query code
  
$sql= SELECT * FROM news WHERE ('$id' = id) ;
$sql_result = mysql_query($sql); 

if (mysql_num_rows($sql_result) ==0)
{
echo (  \n);
}
else {
while ($row = mysql_fetch_array($sql_result)){
  $division = $row[division];
  $title = $row[title];
  $date = $row[date];
  $content = $row[content];
  $link = $row[link];

echo (h3$title/h3 \n);
echo (p . date ('F jS Y',strtotime($date)) .  /p \n);
echo (p$content/p \n);
echo (p /p \n);

}}
?

There is html code inbetween these two statements, and the id number is passed from 
the index page with the news item listed.

Hope someone can help me in the right direction.

Thanks

Barry Zimmermn

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Noob questions...

2002-10-02 Thread Brett Lathrope


Ok, here's my scenario...

My Web Host has all Root Admin control over MySQL and PHP configs (but they
are setup well no complaints there)...I simply have access to 1 DB (already
created) that I can do what I want with (create/delete/update tables).

I'm VERY comfortable in Windows, C/C++, Delphi and SQL.  But I'm a noob to
Unix/Linux, as well as both MySQL and PHP.

I have two books and the online manuals and I'm reading them...unfortunately
almost ALL of them assume you have Root Admin (as well as build) privileges.

Can someone recommend a MySQL Front End, that a) is free and b) a noob can
set up and finally c) allows me to work from a client on MySQL DB on my Web
Host?

Thanks Brett




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Noob questions...

2002-10-02 Thread NIPP, SCOTT V (SBCSI)

Give phpMyAdmin a try...

http://www.phpmyadmin.net/

-Original Message-
From: Brett Lathrope [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 02, 2002 8:55 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Noob questions...



Ok, here's my scenario...

My Web Host has all Root Admin control over MySQL and PHP configs (but they
are setup well no complaints there)...I simply have access to 1 DB (already
created) that I can do what I want with (create/delete/update tables).

I'm VERY comfortable in Windows, C/C++, Delphi and SQL.  But I'm a noob to
Unix/Linux, as well as both MySQL and PHP.

I have two books and the online manuals and I'm reading them...unfortunately
almost ALL of them assume you have Root Admin (as well as build) privileges.

Can someone recommend a MySQL Front End, that a) is free and b) a noob can
set up and finally c) allows me to work from a client on MySQL DB on my Web
Host?

Thanks Brett




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Noob questions...

2002-10-02 Thread Adam Williams

search around for phpmyadmin on google

Adam

On Wed, 2 Oct 2002, Brett Lathrope wrote:


 Ok, here's my scenario...

 My Web Host has all Root Admin control over MySQL and PHP configs (but they
 are setup well no complaints there)...I simply have access to 1 DB (already
 created) that I can do what I want with (create/delete/update tables).

 I'm VERY comfortable in Windows, C/C++, Delphi and SQL.  But I'm a noob to
 Unix/Linux, as well as both MySQL and PHP.

 I have two books and the online manuals and I'm reading them...unfortunately
 almost ALL of them assume you have Root Admin (as well as build) privileges.

 Can someone recommend a MySQL Front End, that a) is free and b) a noob can
 set up and finally c) allows me to work from a client on MySQL DB on my Web
 Host?

 Thanks Brett







-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Noob questions...

2002-10-02 Thread Jason Vincent

You should ask if your ISP has not already installed a phpMyAdmin that you
can use - save you the bother.

-Original Message-
From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 02, 2002 9:57 AM
To: 'Brett Lathrope'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Noob questions...


Give phpMyAdmin a try...

http://www.phpmyadmin.net/

-Original Message-
From: Brett Lathrope [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 02, 2002 8:55 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Noob questions...



Ok, here's my scenario...

My Web Host has all Root Admin control over MySQL and PHP configs (but they
are setup well no complaints there)...I simply have access to 1 DB (already
created) that I can do what I want with (create/delete/update tables).

I'm VERY comfortable in Windows, C/C++, Delphi and SQL.  But I'm a noob to
Unix/Linux, as well as both MySQL and PHP.

I have two books and the online manuals and I'm reading them...unfortunately
almost ALL of them assume you have Root Admin (as well as build) privileges.

Can someone recommend a MySQL Front End, that a) is free and b) a noob can
set up and finally c) allows me to work from a client on MySQL DB on my Web
Host?

Thanks Brett




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Query error

2002-10-02 Thread Wilmar Perez

Hello guys

Does anybody have a clue on what wrong with the following sentence?

select author_code from author where author_code not in 
(select author_code from authorxcat);

Thanks

***
 Wilmar Pérez
 Network Administrator
   Library System
  Tel: ++57(4)2105145
University of Antioquia
   Medellín - Colombia
  2002
***
 
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Query error

2002-10-02 Thread Jeffrey_N_Dyke


if you are using mysql, it doesn't support the sub-select.



   
  
Wilmar Perez 
  
[EMAIL PROTECTED]   To: [EMAIL PROTECTED] 
  
ea.edu.cocc:  
  
  Subject: [PHP-DB] Query error
  
10/02/2002 10:54 AM
  
   
  
   
  




Hello guys

Does anybody have a clue on what wrong with the following sentence?

select author_code from author where author_code not in
   (select author_code from authorxcat);

Thanks

***
 Wilmar Pérez
  Network Administrator
   Library System
   Tel: ++57(4)2105145
 University of Antioquia
   Medellín - Colombia
 2002
***



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Why would this query behave this way??

2002-10-02 Thread Owen Parker

hi all

this query:

SELECT updates.MODELCODE, SETNO, FRPICNO, TOPICNO, CPOSTDATE, MODELNAME,
ZIPFILENAME, TOTPICS FROM updates, models WHERE updates.MODELCODE =
models.MODELCODE AND CPOSTDATE = CURDATE() AND CPOSTDATE = ( CURDATE() -
14 ) ORDER BY CPOSTDATE
LIMIT 0, 30

worked perfectly until the result was an empty array and then it decided to
list all database rows.  How come?

many tia for any answers or pointers...

l8r
owen




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] problem selecting from mssql database

2002-10-02 Thread Kae Verens

I have connected successfully to an MSSQL server, as can be seen by the 
following generated list of existing tables:
http://webworks.ie/200210/

When I try to select from those tables, I get errors, as seen here:
http://webworks.ie/200210/newhomes.php

The source of the above is here:
http://webworks.ie/200210/newhomes.phps

-- 
Kae Verens   ___\_   webworks.ie
work: www.webworks.ie   _\\__   webhosts
play: www.contactjuggling.org  ___\\\___  design
kae:  kverens.contactjuggling.org _ code


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] problem selecting from mssql db

2002-10-02 Thread Kae Verens

I have connected successfully to an MSSQL server, as can be seen by the 
following generated list of existing tables:
http://webworks.ie/200210/

When I try to select from those tables, I get errors, as seen here:
http://webworks.ie/200210/newhomes.php

The source of the above is here:
http://webworks.ie/200210/newhomes.phps

any obvious errors?

-- 
Kae Verens   ___\_   webworks.ie
work: www.webworks.ie   _\\__   webhosts
play: www.contactjuggling.org  ___\\\___  design
kae:  kverens.contactjuggling.org _ code


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] I need Microsoft SQL Library: mssql70.so

2002-10-02 Thread Leo Hotmail



I've installed Linux Red Hat 7.1  with php 4 and have the this libraries in 
/usr/lib/php4

 pgsql.so
 ldap.so
 imap.so

but I need Microsoft SQL Library: mssql70.so

how can I install it?

Leo




Re: [PHP-DB] I need Microsoft SQL Library: mssql70.so

2002-10-02 Thread Adam Voigt

You need the FreeTDS connection library (it works wonders for us):

Goto www.freetds.org
Download it
Configure, make, make install it
Edit your freetds config file to your needs
Add the --with-sybase=/path/to/freetds to your PHP configure line

yes, I know that says sybase, but trust me, it works.

Adam Voigt
[EMAIL PROTECTED]

On Wed, 2002-10-02 at 12:48, Leo Hotmail wrote:
 
 
 I've installed Linux Red Hat 7.1  with php 4 and have the this libraries in 
/usr/lib/php4
 
  pgsql.so
  ldap.so
  imap.so
 
 but I need Microsoft SQL Library: mssql70.so
 
 how can I install it?
 
 Leo
 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Get a single result

2002-10-02 Thread bbonkosk

--- mysql_result($result_category_id, 0, $i);
I think it is compaigning about the '$i' of course we don't know
what that is set to, so cannot help much.  I would say it might not like it 
when '$i' is equal to 0... :-)

-Brad

 Hello guys.
 
 The scenery:  I've got an array with some values stored in it.  I want
to  
 retrieve the id code each value is associated to.  So I just do the
follo wing:
 
 for ($i=0; $icount($form_category);$i++)
 {
 $query_get_id = select cat_code from categories 
where cat_name like '$form_category[$i]';
 $result_category_id = mysql_query($query_get_id) or die(mysql_error());
 $form_category_id[$i] = mysql_result($result_category_id, 0, $i);
//Thi s
   is line
   170
 echo $form_category[$i]. .$form_category_id[$i].br;
 }
 
 I'm getting the following in my browser  (There are some comments I just 
 added):
 
 Arquitectura 2  //This is the correct category name and its ID
 
 Warning: Bad column offset specified 
 in /var/www/bva/new/common/scripts/admin_functions.php on line 170
 Caricatura //This is the correct category name but the ID is lost
 
 Warning: Bad column offset specified 
 in /var/www/bva/new/common/scripts/admin_functions.php on line 170
 Ciencias naturales //Same as before
 
 Any idea of what I'm doing wrong?
 
 ***
  Wilmar Pérez
  Network Administrator
Library System
   Tel: ++57(4)2105145
 University of Antioquia
Medellín - Colombia
   2002
 ***
  
  
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Difference in time

2002-10-02 Thread wade

Hello all,

I am fighting a time issue(don't we all). I have a online poll set up. I
need a way to stop a person from
submitting more than once an hour. As of now I have the time .. mktime(
) .. being stored in a database along
with the users IP.

I want to be able to say if 1 hour has passed from the time .. mktime( )
.. that is stored in the db they can vote once again. This also has to
account that if someone goes to the poll tomorrow at the same time (same
hour) the script knows it's a different hour and different day.

Scenario: I submit to the poll at 12:00 PM, one hour from now will be
1:00 PM and I can submit again. Now lets
say it's 12:00 PM the next day. The database stored time will say 12:00
PM of the day before, It will not let me submit because it thinks that
it has to be at least 1:00 PM before I can submit again. Which is wrong.

I was trying to use the mktime( ) function but it keeps giving me these
results.(( 1033578795 )) The last few
numbers change but the first few (that as suppose to be the hour) does
not change?
mktime(int hour, int minute, int second, int month, int day, int year).
How can I use this mktime( ) function to do what I need it to? Am I
going in the wrong direction?

Thank you very much
Wade



--
Should you have any questions, comments or concerns, feel free to call
me at 318-338-2033.

Thank you for your time,

Wade Kelley, Design Engineer

Bayou Internet...(888) 30-BAYOU...http://www.bayou.com
Mississippi Internet...(800) MISSISSIPPI...http://www.mississippi.net
Vicksburg Online...(800) MISSISSIPPI...http://www.vicksburg.com





[PHP-DB] Retrieve auto_increment value after an insert with ODBC

2002-10-02 Thread Stéphane

Hi,

I use php and db2 database. I wonder if there is a way  to retrieve the
value of an auto-increment id after an insert query.
(Like mysql_insert_id on MySQL database.)
The temporary solution is to select record with the same values than the
insert.

Any others solutions?



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Retrieve auto_increment value after an insert with ODBC

2002-10-02 Thread Ryan Jameson (USA)

You can select max(aifield) immediately after the insert. :-)

 Ryan

-Original Message-
From: Stéphane [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 02, 2002 11:57 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Retrieve auto_increment value after an insert with
ODBC


Hi,

I use php and db2 database. I wonder if there is a way  to retrieve the
value of an auto-increment id after an insert query.
(Like mysql_insert_id on MySQL database.)
The temporary solution is to select record with the same values than the
insert.

Any others solutions?



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Difference in time

2002-10-02 Thread Jason Vincent

for mySQL, the table would look like...
 
CREATE TABLE polls(
 pollID INT NOT NULL AUTO_INCREMENT,
 ipAddress VARCHAR (50) NULL,
 insertTime DATETIME NULL,
 etc...
 
 PRIMARY KEY (pollID)
);
 
===
the code would look like...

$statement = select pollID from polls where insertTime  (now() - INTERVAL
1 HOUR);  //see mySQL date time functions for a description of this
$result = mysql_query($statement);
$rowsReturned = mysql_num_rows($result);
 
if($rowsReturned){
 print Sorry you already voted in the last hour;
}else{
 insert into polls (ipAddress,insertTime) values ('$ipAddress',now());
}
 

P.S. - now() is a database function that will insert the time for you
(mySQL is usually -dd-mm hh:mm:ss)

-Original Message-
From: wade [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 02, 2002 2:56 PM
To: Vincent, Jason [BRAM:1334:EXCH]
Subject: Re: [PHP-DB] Difference in time


MYSQL 

Here is a sample of what I am doing 
  


$ip = $_SERVER['REMOTE_ADDR']; 
$time_now = mktime(); 
  
// open connection to database 
$connection = mysql_connect($hostname, $user, $pass) or die (Unable
to connect!); 
  
// get the IP and stored DB time 
$query = SELECT ip_address, server_time 
 FROM stats 
WHERE ip_address = '$ip'; 
$result = mysql_db_query($database, $query, $connection) or die
(Error in query: $query.  . mysql_error()); 
  
$row = mysql_fetch_array($result); 
$get_ip = $row['ip_address']; 
$get_server_time = $row['server_time']; 
  
// close connection 
mysql_close($connection); 
mysql_free_result($result); 
  
if ($ip == $get_ip) 
{ 
$connection = mysql_connect($hostname, $user, $pass) or die
(Unable to connect!); 
$query=select * from stats where server_time  'now()- 1
hour' and ip_address = '$ip'; 
$result = mysql_db_query($database, $query, $connection) or
die (Error in query: $query.  . mysql_error()); 
  
$row = mysql_fetch_array($result); 
$get_ip2 = $row['ip_address']; 
$get_server_time2 = $row['server_time']; 
// close connection 
mysql_close($connection); 
mysql_free_result($result); 
  
if ($get_server_time2) 
{ 
echo Sorry cannot vote; 
exit; 
} 
} 


Jason Vincent wrote: 


  

what kind of database are you using? 


-Original Message- 
From: wade [mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] 
Sent: Wednesday, October 02, 2002 2:47 PM 
To: Vincent, Jason [BRAM:1334:EXCH] 
Subject: Re: [PHP-DB] Difference in time 


One question on this issue. What should I store in the database mktime( ).
time( )? 


Jason Vincent wrote: 


 yeah - the mktime function is returning unix style time (seconds since 
 1970) which is why only the last few numbers are changing.  I would 
 recommend letting the database decide who is able to submit... i.e. 
 
 select * from database where lastSubmitDate  'now()- 1 hour' and IP = 
 '$ipaddress' 
 
 if there is a returned record from the database, you know that this 
 person has made a submission in the last hour.  Otherwise, let them 
 submit again 
 
 Obviously, you will need to figure out the sytax for the now() -1 hour 
 part depending on your database. 
 
 -Original Message- 
 From: wade [mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] 
 Sent: Wednesday, October 02, 2002 1:29 PM 
 To: [EMAIL PROTECTED] 
 Subject: [PHP-DB] Difference in time 
 
 Hello all, 
 
 I am fighting a time issue(don't we all). I have a online poll set up. 
 I need a way to stop a person from submitting more than once an hour. 
 As of now I have the time .. mktime( 
 ) .. being stored in a database along 
 with the users IP. 
 
 I want to be able to say if 1 hour has passed from the time .. mktime( 
 ) .. that is stored in the db they can vote once again. This also has 
 to account that if someone goes to the poll tomorrow at the same time 
 (same 
 hour) the script knows it's a different hour and different day. 
 
 Scenario: I submit to the poll at 12:00 PM, one hour from now will be 
 1:00 PM and I can submit again. Now lets say it's 12:00 PM the next 
 day. The database stored time will say 12:00 PM of the day before, It 
 will not let me submit because it thinks that it has to be at least 
 1:00 PM before I can submit again. Which is wrong. 
 
 I was trying to use the mktime( ) function but it keeps giving me 
 these results.(( 1033578795 )) The last few numbers change but the 
 first few (that as suppose to be the hour) does not change? mktime(int 
 hour, int minute, int second, int month, int day, int year). How can I 
 use this mktime( ) function to do what I need it to? Am I going in 

Re: [PHP-DB] Noob questions...

2002-10-02 Thread Russell Griechen

Try this
http://www.mydomain.com/phpmyadmin/ and be ready with your password.

Russell Griechen

 You should ask if your ISP has not already installed a phpMyAdmin that you
 can use - save you the bother.




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Difference in time

2002-10-02 Thread John W. Holmes

 I am fighting a time issue(don't we all). I have a online poll set up.
I
 need a way to stop a person from
 submitting more than once an hour. As of now I have the time ..
mktime(
 ) .. being stored in a database along
 with the users IP.
 
 I want to be able to say if 1 hour has passed from the time .. mktime(
)
 .. that is stored in the db they can vote once again. This also has to
 account that if someone goes to the poll tomorrow at the same time
(same
 hour) the script knows it's a different hour and different day.
 
 Scenario: I submit to the poll at 12:00 PM, one hour from now will be
 1:00 PM and I can submit again. Now lets
 say it's 12:00 PM the next day. The database stored time will say
12:00
 PM of the day before, It will not let me submit because it thinks that
 it has to be at least 1:00 PM before I can submit again. Which is
wrong.
 
 I was trying to use the mktime( ) function but it keeps giving me
these
 results.(( 1033578795 )) The last few
 numbers change but the first few (that as suppose to be the hour) does
 not change?
 mktime(int hour, int minute, int second, int month, int day, int
year).
 How can I use this mktime( ) function to do what I need it to? Am I
 going in the wrong direction?

SELECT 1 FROM table WHERE FROM_UNIXTIME(last_post)  (NOW() - INTERVAL 1
HOUR) AND User_ID = XXX

If a row is returned, then the user is clear to vote, it's been over an
hour.

---John Holmes...



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] MySQL 4.x and PHP

2002-10-02 Thread John W. Holmes

 New MySQL is out I noticed (4.0.4).  Is there any way to make it work
 correctly with PHP?  I haven't seen any modules for download or
comments
 about this issue.
 
 I'm just wondering if there is some modifications I can make or if I'm
 just
 stuck with MySQL 3.x until something new is released by the PHP guys.

It's still in development phase, not production level yet. You install
it just as normal and use the mysql_* commands like normal. Some of the
new features, like SSL, will be included in the next PHP version (a way
to access them, that is).

---John Holmes...



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] postgres cursors

2002-10-02 Thread steve shapero

hi,

i have a function that returns a cursor.  how do i get at it in php?

here's my function:
create function test3 (INTEGER) RETURNS refcursor AS '
DECLARE
 cursor1 CURSOR FOR select description FROM t0040stock_item WHERE
stock_number = $1;
BEGIN
  open cursor1;
  return (cursor1);
END;
' LANGUAGE 'plpgsql';



thanks



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Query error

2002-10-02 Thread Beau Lebens

If it's on MySQL, then the problem is that it doesn't support nested queries
:)

If it's on something else, i'm afraid i don't know :/

Back to MySQL, you can get around that by doing your select author_code
from authorxcat component query, then put the results into 'x', 'y', 'z'
format, then do something like
select author_code from author where author_code not in ($previousResults)

HTH

Beau

// -Original Message-
// From: Wilmar Perez [mailto:[EMAIL PROTECTED]]
// Sent: Wednesday, 2 October 2002 10:54 PM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] Query error
// 
// 
// Hello guys
// 
// Does anybody have a clue on what wrong with the following sentence?
// 
// select author_code from author where author_code not in 
//  (select author_code from authorxcat);
// 
// Thanks
// 
// ***
//  Wilmar Pérez
//  Network Administrator
//Library System
//   Tel: ++57(4)2105145
// University of Antioquia
//Medellín - Colombia
//   2002
// ***  
//   
//  
//  
// 
// -- 
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, visit: http://www.php.net/unsub.php
// 

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Sending E-Mail

2002-10-02 Thread tuxen

just put the variables from the form into the mail() function

On Wed, 2002-10-02 at 23:11, Shoulder to Shoulder Farm wrote:
 Sorry all, this IS off topic, but I always receive faster answers from 
 this group :-o!
 How can I send e-mail from PHP with the content of a submitted form.
 Thanks, Taj
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] VERY NEWBIE php_* mod_* --with- question

2002-10-02 Thread Aleksandar

Hello List for the first time,
I am very new to php but impressed from what i've seen so far. I managed to 
configure php w/ mysql and db2 do some selects, inserts ... 
What I am inerested in is what are all those mod_php* and php_* on the 
distribution's CDs e.g. if they are installed how do i get support for 
which i thought i have installed the module( like rpm -i  
php-oracle-4.2.2-1j1.i686.rpm means that i can somehow get oracle support 
without recompiling php ??? or no). 
Another thing that bothers me is should I (can I) use for example Oracle's 
apache or install regular apache and work with it.
Is Apache-PHP-Linux on one machine and OracleDB-Win/Lin on another machine 
big trouble or peace of cake (It asks me for oci8 lib which I don't know 
where to get if I don't want to install any oracle products on the web 
server (can i get them from php-oci8...rpm for example)
DSO e.g. oracle.so is a shared object but where to include it for the 
support and is it enough)
Thank you all and looking forward to hearing from you

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php