[PHP-DB] Library Management System

2001-03-30 Thread Sharmad Naik

Hi Everyone,
Please bear with me.I am a final year student from India-Goa, and
+developing a library management system which can be adopted by any University
+(Hopefully). We are developing this project using PHP and PostgreSql.The good
+thing that we appreciate is that this project is based on the ISO format 2709
+adopted by UGC. We would like to know from all the intrested people for this
+project , that what are their expectations from this project like information
+on statistics.
Right now we are developing the html and PHP pages.We have written a
+perl script to import the data from ISO format into PostgreSql database so that
+any library right now running on the CDISIS/WWWISIS package can easily export 
+to ISO format that will be imported into PostgreSql. Due to non existing record
+for Serials and Thesis we have not been able to test the perl script for
+Serials and Thesis records althought the books has been completed throughly. We
+would be very thankful if anyone could give us a record or two of Thesis and
+Serials in ISO 2709 format.
Hoping for a best,

Yours sincerly,
Hiren & Sharmad

-- 
The secret of the universe is @*&í!'ñ^#+ NO CARRIER
___  _  _  _
|_|_||_||_||\/||_|| \
_|| || || \|  || ||_/

-- 
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] Library Managament project

2001-03-30 Thread Sharmad Naik

Hi Everyone,
Please bear with me.I am a final year student from India-Goa, and developing a 
library management system which can be adopted by any University (Hopefully). We are 
developing this project using PHP and PostgreSql.The good thing that we appreciate is 
that this project is based on the ISO format 2709 adopted by UGC. We would like to 
know from all the intrested people for this project , that what are their expectations 
from this project like information on statistics. 
Right now we are developing the html and PHP pages.We have written a perl 
script to import the data from ISO format into PostgreSql database so that any library 
right now running on the CDISIS/WWWISIS package can easily export to ISO format that 
will be imported into PostgreSql. Due to non existing record for Serials and Thesis we 
have not been able to test the perl script for Serials and Thesis records althought 
the books has been completed throughly. We would be very thankful if anyone could give 
us a record or two of Thesis and Serials in ISO 2709 format. 
Hoping for a best,

Yours sincerly,
Hiren & Sharmad 

-- 
The secret of the universe is @*&í!'ñ^#+ NO CARRIER
___  _  _  _
|_|_||_||_||\/||_|| \
_|| || || \|  || ||_/

-- 
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.net website down?

2001-03-30 Thread Chris Hall

sweet thnx man
:)
--
Chris Hall
sytems administrator
funnelbox mediaworks
[EMAIL PROTECTED]
""Chris Hall"" <[EMAIL PROTECTED]> wrote in message
9a1g2o$6mb$[EMAIL PROTECTED]">news:9a1g2o$6mb$[EMAIL PROTECTED]...
> Off subject but anyone know why php.net is down??
>
> --
> Chris Hall
> sytems administrator
> funnelbox mediaworks
> [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] How to eliminate bad fields from a mysql query?

2001-03-30 Thread Phil Jackson

If there are some fields that you absolutley require, or must be in a valid
format,  I'd
use javascript to edit the form first - no reason to make a round trip to
the server for
something you can do server-side.

**Or** - say the form is for selecting an automobile - make is required but
color isn't
nor is model.
$sql = "Select * from someDB where make =" . $make;

If $model > "" {
  $sql = $sql . " And model = " . $model;
  }

If $color > "" {
  $sql = $sql . " and color=" . $color
  }

Build your sql string incrementally and conditionally - check what you can
client-side..

Phil J.


Bob Stone wrote:

> Dear PHP Helpers,
>
> Can you direct me to a solution for this problem:
>
> How can I eliminate bad (blank or incorrect) fields
> from a mysql query? In other words, if someone leaves
> a form field blank or enters a value that does not
> have a matching entry in the database, how can I
> eliminate that variable from the query?
>
> The query that I am using now works fine if the user
> enters a value in field that exists in the database.
> However if a field is left blank or incorrect data is
> entered, no results will display on the screen.
>
> Here is the code that I am using:
>
> $result = mysql_query("SELECT salutation, first_name,
> mid_name, user_name, cert_deg, job_title, institution,
> address_1, address_2, geo_loc, state, zip, country,
> phone, fax, e_mail FROM svt_members where first_name
> like '$first_name' && user_name like '$user_name' &&
> institution like '$institution' && state='$state' &&
> country like '$country'", $db);
>
> while ($myrow = mysql_fetch_array($result)) {
>
> printf("Name: %s
> %s %s %s\n", $myrow["salutation"],
> $myrow["first_name"], $myrow["mid_name"],
> $myrow["user_name"]);
>
> printf("Credentials and Degrees:  color=\"blue\" size=\2\">%sJob Title:
>  size=\2\">%sCompany/Institution:
>  size=\2\">%sAddress:  color=\"blue\" size=\2\">%s %sCity:
> %s
> State/Province:  size=\2\">%sCountry:  color=\"blue\" size=\2\">%s   Postal Code:
>  size=\2\">%sVoice:  color=\"blue\" size=\2\">%s   Fax:  color=\"blue\" size=\2\">%sE-mail:
> %s\n",
> $myrow["cert_deg"], $myrow["job_title"],
> $myrow["institution"], $myrow["address_1"],
> $myrow["address_2"], $myrow["geo_loc"],
> $myrow["state"], $myrow["country"], $myrow["zip"],
> $myrow["phone"], $myrow["fax"], $myrow["e_mail"]);
> }
>
> So if (for instance) a user enters data for each field
> except institution, how can I get the query to
> disregard $institution?
>
> Or if there is a better approach that I should be
> using instead of the above, please let me know.
>
> Thank you,
>
> Bob
>
> __
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/?.refer=text
>
> --
> 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] count function?

2001-03-30 Thread Phil Jackson

What is retrieved if you do a Select Count(*) from myDb where
condition = parameters?

Seems your result set should contain this value...
Phil J.


DC wrote:

> Hi All
> I cant quite work out how to count the number of rows in my mysql db that
> match a certain critieria and the show that number numericaly in my pages.
>
> Checked books, php.net etc.
>
> Any help is appreciated
>
> Yours Dave C
>
> --
> 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] RE: [PHP] RE: what exactly are /path/to/blah lookingfor? .h? .so? .a? what?!

2001-03-30 Thread Andrew Hill

Daevid,

just --with-iodbc or --with-openlink is fine.

you should be using either:

--with-iodbc=/usr/local/openlink/odbcsdk \
or
--with-openlink=/usr/local/openlink/lib \

depending on which you use and where you installed the sdk.
what error are you getting?

Best regards,
Andrew


On 3/30/01 6:54 PM, "Daevid Vincent" <[EMAIL PROTECTED]> wrote:

> thanks for replying Andrew, but that's not working for me either.
> 
> Also, do I need both "--with-iodbc" and "--with-openlink" or do I just need
> one of them?
> 
> These are the instructions I've been following:
> http://www.iodbc.org/odbc-phpHOWTO.html
> 
> so now I've tried:
> 
>#--with-iodbc=/usr/local/openlink/odbcsdk/lib \
>#--with-iodbc=/usr/local/openlink/odbcsdk \
>#--with-iodbc=/usr/local/openlink/lib \
>#--with-iodbc=/usr/local/bin \
>#--with-iodbc=/usr/local \
>#--with-iodbc=/usr/local/include \
>#--with-iodbc=../libiodbc \
>#--with-openlink=/usr/local/openlink/odbcsdk/lib \
>#--with-openlink=/usr/local/openlink/odbcsdk \
>#--with-openlink=/usr/local/openlink \
>#--with-openlink=/usr/local/openlink/lib \
> 
> here is my dir structure:
> the files are there, why won't PHP see them? In fact I have the
> "libiodbc.so" library in TWO places I see: "openlink/lib/" and
> "openlink/odbcsdk/lib/"
> 
> [root=pts/1]3:45pm@content:{/usr/local/openlink}> ll -r
> /usr/local/openlink/*
> -rw-rw-rw-1 nobody   html0 Mar 29 20:20
> /usr/local/openlink/oplrqb.ini
> -rwxr-xr-x1 nobody   html  707 Mar 30 15:16
> /usr/local/openlink/openlink.sh*
> -rwxr-xr-x1 nobody   html  619 Mar 30 15:16
> /usr/local/openlink/openlink.csh*
> -rw-rw-rw-1 nobody   html  180 Mar 29 20:21
> /usr/local/openlink/odbcinst.ini
> -rw-rw-rw-1 nobody   html  541 Mar 30 13:51
> /usr/local/openlink/odbc.ini
> -rw-rw-rw-1 nobody   html   196347 Mar 29 17:54
> /usr/local/openlink/l2oc.taz
> -rw-rw-rw-1 nobody   html   364085 Mar 30 15:16
> /usr/local/openlink/l2ku.taz
> -rw-rw-rw-1 nobody   html   512218 Mar 30 15:16
> /usr/local/openlink/l2ko.taz
> -rwxrwxrwx1 nobody   html16137 Mar 30 15:16
> /usr/local/openlink/install.sh*
> 
> /usr/local/openlink/udbcsdk:
> total 16
> drwxr-xr-x2 nobody   html 4096 Mar  7 14:44 lib/
> drwxr-xr-x3 nobody   html 4096 Mar  7 14:44 include/
> drwxr-xr-x2 nobody   html 4096 Mar  7 14:44 examples/
> drwxr-xr-x2 nobody   html 4096 Mar  7 14:44 doc/
> 
> /usr/local/openlink/lib:
> total 400
> -rw-r--r--1 nobody   html   272057 Mar  7 14:43 oplodbc.so.1.0.0
> lrwxrwxrwx1 nobody   html   16 Mar 30 15:16 oplodbc.so.1 ->
> oplodbc.so.1.0.0
> lrwxrwxrwx1 nobody   html   16 Mar 30 15:16 oplodbc.so ->
> oplodbc.so.1.0.0
> -rw-r--r--1 nobody   html  678 Mar  7 14:43 oplodbc.la
> lrwxrwxrwx1 nobody   html   17 Mar 30 15:16 libodbc.so ->
> libiodbc.so.2.1.2*
> -rwxr-xr-x1 nobody   html   117877 Mar  7 14:43 libiodbc.so.2.1.2*
> lrwxrwxrwx1 nobody   html   17 Mar 30 15:16 libiodbc.so.2 ->
> libiodbc.so.2.1.2*
> lrwxrwxrwx1 nobody   html   17 Mar 30 15:16 libiodbc.so ->
> libiodbc.so.2.1.2*
> -rwxr-xr-x1 nobody   html  669 Mar  7 14:43 libiodbc.la*
> 
> /usr/local/openlink/bin:
> total 140
> -rw---1 nobody   html   29 Mar 30 15:16 oplrqb.ini
> -rwxr-xr-x1 nobody   html92225 Mar  7 14:43 odbctest*
> -rw-r--r--1 nobody   html  170 Mar  7 14:43 odbcinst.ini.sample
> -rw-r--r--1 nobody   html  170 Mar  7 14:43 odbcinst.ini
> -rw-r--r--1 nobody   html  473 Mar  7 14:43 odbc.ini.sample
> -rw-r--r--1 nobody   html  473 Mar  7 14:43 odbc.ini
> -rwxr--r--1 nobody   html23260 Mar  7 14:43 inifile*
> 
> /usr/local/openlink/odbcsdk:
> total 20
> drwxr-xr-x2 nobody   html 4096 Mar 30 15:16 lib/
> drwxr-xr-x2 nobody   html 4096 Mar 30 15:16 include/
> drwxr-xr-x2 nobody   html 4096 Mar 30 15:16 examples/
> drwxr-xr-x2 nobody   html 4096 Mar 30 15:16 driver/
> drwxr-xr-x2 nobody   html 4096 Mar 30 15:16 doc/
> 
> and then here is the odbcsdk directory tree:
> 
> [root=pts/1]3:51pm@content:{/usr/local/openlink}> ll -r odbcsdk/*
> odbcsdk/lib:
> total 976
> -rw-r--r--1 nobody   html   272057 Mar  7 14:42 oplodbc.so.1.0.0
> lrwxrwxrwx1 nobody   html   16 Mar 30 15:16 oplodbc.so.1 ->
> oplodbc.so.1.0.0
> lrwxrwxrwx1 nobody   html   16 Mar 30 15:16 oplodbc.so ->
> oplodbc.so.1.0.0
> -rw-r--r--1 nobody   html  678 Mar  7 14:42 oplodbc.la
> -rw-r--r--1 nobody   html   431992 Mar  7 14:42 oplodbc.a
> -rwxr-xr-x1 nobody   html   117877 Mar  7 14:42 libiodbc.so.2.1.2*
>

RE: [PHP-DB] connection to smtp

2001-03-30 Thread Greg Donald

No, the mail() function will not work without a valid MTA.  I believe the
default is sendmail.  But yeah, you can change that in the php.ini file.

> -Original Message-
> From: fam.paauwe [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 30, 2001 1:20 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] connection to smtp
>
>
> My php mail() function failes to make a connection to my local
> smtp server. Which server is best suitable and what do I have to
> change in my php.ini file so that the mail() function will
> operate correctly?
>
> Does the mail() function work without an smtp server?
> Do I have to have an internet connection to use the mail( ) function?
>
> thanx,
> ufo :-)
>


-- 
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: [PHP] RE: what exactly are /path/to/blah looking for? .h? .so? .a? what?!

2001-03-30 Thread Daevid Vincent

thanks for replying Andrew, but that's not working for me either.

Also, do I need both "--with-iodbc" and "--with-openlink" or do I just need
one of them?

These are the instructions I've been following:
http://www.iodbc.org/odbc-phpHOWTO.html

so now I've tried:

 #--with-iodbc=/usr/local/openlink/odbcsdk/lib \
 #--with-iodbc=/usr/local/openlink/odbcsdk \
 #--with-iodbc=/usr/local/openlink/lib \
 #--with-iodbc=/usr/local/bin \
 #--with-iodbc=/usr/local \
 #--with-iodbc=/usr/local/include \
 #--with-iodbc=../libiodbc \
 #--with-openlink=/usr/local/openlink/odbcsdk/lib \
 #--with-openlink=/usr/local/openlink/odbcsdk \
 #--with-openlink=/usr/local/openlink \
 #--with-openlink=/usr/local/openlink/lib \

here is my dir structure:
the files are there, why won't PHP see them? In fact I have the
"libiodbc.so" library in TWO places I see: "openlink/lib/" and
"openlink/odbcsdk/lib/"

[root=pts/1]3:45pm@content:{/usr/local/openlink}> ll -r
/usr/local/openlink/*
-rw-rw-rw-1 nobody   html0 Mar 29 20:20
/usr/local/openlink/oplrqb.ini
-rwxr-xr-x1 nobody   html  707 Mar 30 15:16
/usr/local/openlink/openlink.sh*
-rwxr-xr-x1 nobody   html  619 Mar 30 15:16
/usr/local/openlink/openlink.csh*
-rw-rw-rw-1 nobody   html  180 Mar 29 20:21
/usr/local/openlink/odbcinst.ini
-rw-rw-rw-1 nobody   html  541 Mar 30 13:51
/usr/local/openlink/odbc.ini
-rw-rw-rw-1 nobody   html   196347 Mar 29 17:54
/usr/local/openlink/l2oc.taz
-rw-rw-rw-1 nobody   html   364085 Mar 30 15:16
/usr/local/openlink/l2ku.taz
-rw-rw-rw-1 nobody   html   512218 Mar 30 15:16
/usr/local/openlink/l2ko.taz
-rwxrwxrwx1 nobody   html16137 Mar 30 15:16
/usr/local/openlink/install.sh*

/usr/local/openlink/udbcsdk:
total 16
drwxr-xr-x2 nobody   html 4096 Mar  7 14:44 lib/
drwxr-xr-x3 nobody   html 4096 Mar  7 14:44 include/
drwxr-xr-x2 nobody   html 4096 Mar  7 14:44 examples/
drwxr-xr-x2 nobody   html 4096 Mar  7 14:44 doc/

/usr/local/openlink/lib:
total 400
-rw-r--r--1 nobody   html   272057 Mar  7 14:43 oplodbc.so.1.0.0
lrwxrwxrwx1 nobody   html   16 Mar 30 15:16 oplodbc.so.1 ->
oplodbc.so.1.0.0
lrwxrwxrwx1 nobody   html   16 Mar 30 15:16 oplodbc.so ->
oplodbc.so.1.0.0
-rw-r--r--1 nobody   html  678 Mar  7 14:43 oplodbc.la
lrwxrwxrwx1 nobody   html   17 Mar 30 15:16 libodbc.so ->
libiodbc.so.2.1.2*
-rwxr-xr-x1 nobody   html   117877 Mar  7 14:43 libiodbc.so.2.1.2*
lrwxrwxrwx1 nobody   html   17 Mar 30 15:16 libiodbc.so.2 ->
libiodbc.so.2.1.2*
lrwxrwxrwx1 nobody   html   17 Mar 30 15:16 libiodbc.so ->
libiodbc.so.2.1.2*
-rwxr-xr-x1 nobody   html  669 Mar  7 14:43 libiodbc.la*

/usr/local/openlink/bin:
total 140
-rw---1 nobody   html   29 Mar 30 15:16 oplrqb.ini
-rwxr-xr-x1 nobody   html92225 Mar  7 14:43 odbctest*
-rw-r--r--1 nobody   html  170 Mar  7 14:43 odbcinst.ini.sample
-rw-r--r--1 nobody   html  170 Mar  7 14:43 odbcinst.ini
-rw-r--r--1 nobody   html  473 Mar  7 14:43 odbc.ini.sample
-rw-r--r--1 nobody   html  473 Mar  7 14:43 odbc.ini
-rwxr--r--1 nobody   html23260 Mar  7 14:43 inifile*

/usr/local/openlink/odbcsdk:
total 20
drwxr-xr-x2 nobody   html 4096 Mar 30 15:16 lib/
drwxr-xr-x2 nobody   html 4096 Mar 30 15:16 include/
drwxr-xr-x2 nobody   html 4096 Mar 30 15:16 examples/
drwxr-xr-x2 nobody   html 4096 Mar 30 15:16 driver/
drwxr-xr-x2 nobody   html 4096 Mar 30 15:16 doc/

and then here is the odbcsdk directory tree:

[root=pts/1]3:51pm@content:{/usr/local/openlink}> ll -r odbcsdk/*
odbcsdk/lib:
total 976
-rw-r--r--1 nobody   html   272057 Mar  7 14:42 oplodbc.so.1.0.0
lrwxrwxrwx1 nobody   html   16 Mar 30 15:16 oplodbc.so.1 ->
oplodbc.so.1.0.0
lrwxrwxrwx1 nobody   html   16 Mar 30 15:16 oplodbc.so ->
oplodbc.so.1.0.0
-rw-r--r--1 nobody   html  678 Mar  7 14:42 oplodbc.la
-rw-r--r--1 nobody   html   431992 Mar  7 14:42 oplodbc.a
-rwxr-xr-x1 nobody   html   117877 Mar  7 14:42 libiodbc.so.2.1.2*
lrwxrwxrwx1 nobody   html   17 Mar 30 15:16 libiodbc.so.2 ->
libiodbc.so.2.1.2*
lrwxrwxrwx1 nobody   html   17 Mar 30 15:16 libiodbc.so ->
libiodbc.so.2.1.2*
-rwxr-xr-x1 nobody   html  669 Mar  7 14:42 libiodbc.la*
-rw-r--r--1 nobody   html   143692 Mar  7 14:42 libiodbc.a

odbcsdk/include:
total 136
-rw-r--r--1 nobody   html11973 Mar  7 14:42 udbcext.h
-rw-r--r--1 nobody   html 6362 Mar  7 14:42 sqltypes.h
-rw-r--r--1 nobody   html67955 Mar  7 14:42 s

[PHP-DB] CSS versus Includes

2001-03-30 Thread Matt Braynard

I have found that includes work just about as well. Any suggestions on going
with one or the other?



-- 
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] How to eliminate bad fields from a mysql query?

2001-03-30 Thread Oson, Chris M.

Bob,

Don't know if this is what you're looking for, but you *could* do something
like:

$noData = true;
$strSQL = "SELECT field1, field2, field3 FROM table ";
$results = mysql_query($strSQL, $db) or $noData = false;

if ($noData) {
print "";
while (list($field1, $field2, $field3) =
mysql_fetch_array($results)) {
len(trim($field1)) > 0 ? print
"LABEL$field1" : print "";
len(trim($field2)) > 0 ? print
"LABEL$field2" : print "";
len(trim($field3)) > 0 ? print
"LABEL$field3" : print "";
}
print "";
}

somewhere in your code, you might consider a cascading-style sheet

1.  Cleaner to read
2.  Eliminates redundant code
3.  Smaller file size
4.  Smaller file size = faster download

maybe something like...




now about consistent values in the database you could setup an ENUM field to
ensure that you're getting 
data consistently.  mySQL won't allow certain things to be entered if it
doesn't follow a convention...

Ex:

mysql>ALTER TABLE tShirts ADD sizes ENUM('S','M','L','XL','XXL') NOT NULL
DEFAULT('M');

now for institutions???

the IF-THEN/WHILE structure will prevent blank entries, incorrect entries
are another thing...

HTH,

christohper Oson

-Original Message-
From: Bob Stone [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 2:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] How to eliminate bad fields from a mysql query?


Dear PHP Helpers,

Can you direct me to a solution for this problem:

How can I eliminate bad (blank or incorrect) fields
from a mysql query? In other words, if someone leaves
a form field blank or enters a value that does not
have a matching entry in the database, how can I
eliminate that variable from the query?

The query that I am using now works fine if the user
enters a value in field that exists in the database.
However if a field is left blank or incorrect data is
entered, no results will display on the screen.

Here is the code that I am using:

$result = mysql_query("SELECT salutation, first_name,
mid_name, user_name, cert_deg, job_title, institution,
address_1, address_2, geo_loc, state, zip, country,
phone, fax, e_mail FROM svt_members where first_name
like '$first_name' && user_name like '$user_name' &&
institution like '$institution' && state='$state' &&
country like '$country'", $db);

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

printf("Name: %s
%s %s %s\n", $myrow["salutation"],
$myrow["first_name"], $myrow["mid_name"],
$myrow["user_name"]);

printf("Credentials and Degrees: %sJob Title:
%sCompany/Institution:
%sAddress: %s %sCity:
%s  
State/Province: %sCountry: %s   Postal Code:
%sVoice: %s   Fax: %sE-mail:
%s\n",
$myrow["cert_deg"], $myrow["job_title"],
$myrow["institution"], $myrow["address_1"],
$myrow["address_2"], $myrow["geo_loc"],
$myrow["state"], $myrow["country"], $myrow["zip"],
$myrow["phone"], $myrow["fax"], $myrow["e_mail"]);
}

So if (for instance) a user enters data for each field
except institution, how can I get the query to
disregard $institution?

Or if there is a better approach that I should be
using instead of the above, please let me know.

Thank you,

Bob

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text

-- 
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: what exactly are /path/to/blah looking for? .h? .so? .a? what?!

2001-03-30 Thread Andrew Hill

Daevid,

It's the path/to/odbcsdk
It's looking for libiodbc.so

:)

Best regards,
Andrew
--
Andrew Hill - OpenLink Software
Director Technology Evangelism
eBusiness Infrastructure Technology
http://www.openlinksw.com


> -Original Message-
> From: Daevid Vincent [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 30, 2001 5:34 PM
> To: [EMAIL PROTECTED]; PHP General
> Cc: [EMAIL PROTECTED]
> Subject: what exactly are /path/to/blah looking for? .h? .so? .a? what?!
>
>
> > I'm having difficulties with that line:
> >
> > ./configure --with-openlink=/path/to/openlink/
> > --with-iodbc=/path/to/iodbc/
>
> so I've tried every combination I can think of related to "iodbc" and
> "openlink", and none of these are compiling. Every one results in "No such
> file or directory"!
>
> ./configure --with-mysql=/usr/local \
> --with-apache=../apache \
>  #--with-iodbc=/usr/local/openlink/lib \
>  #--with-iodbc=/usr/local/bin \
>  #--with-iodbc=/usr/local \
>  #--with-iodbc=/usr/local/include \
>  #--with-iodbc=../libiodbc \
>  #--with-openlink=/usr/local/openlink \
>  #--with-openlink=/usr/local/openlink/lib
>
> Can someone tell me what exactly is /path/to/openlink and /path/to/iodbc?
> is it the .h file? is it the .so files? is it the .a files? what
> the heck is
> it?
>
> And why don't the INSTALL directions just tell me that? so if PHP
> expects to
> find the .h file,
> why don't they document it like: "--with-iodbc=/path/to/iodbc .h files" so
> people aren't confused like me.
>
> Please help. Thanks.
>
> D.
>
>


-- 
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] How to eliminate bad fields from a mysql query?

2001-03-30 Thread Bob Stone

Dear PHP Helpers,

Can you direct me to a solution for this problem:

How can I eliminate bad (blank or incorrect) fields
from a mysql query? In other words, if someone leaves
a form field blank or enters a value that does not
have a matching entry in the database, how can I
eliminate that variable from the query?

The query that I am using now works fine if the user
enters a value in field that exists in the database.
However if a field is left blank or incorrect data is
entered, no results will display on the screen.

Here is the code that I am using:

$result = mysql_query("SELECT salutation, first_name,
mid_name, user_name, cert_deg, job_title, institution,
address_1, address_2, geo_loc, state, zip, country,
phone, fax, e_mail FROM svt_members where first_name
like '$first_name' && user_name like '$user_name' &&
institution like '$institution' && state='$state' &&
country like '$country'", $db);

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

printf("Name: %s
%s %s %s\n", $myrow["salutation"],
$myrow["first_name"], $myrow["mid_name"],
$myrow["user_name"]);

printf("Credentials and Degrees: %sJob Title:
%sCompany/Institution:
%sAddress: %s %sCity:
%s  
State/Province: %sCountry: %s   Postal Code:
%sVoice: %s   Fax: %sE-mail:
%s\n",
$myrow["cert_deg"], $myrow["job_title"],
$myrow["institution"], $myrow["address_1"],
$myrow["address_2"], $myrow["geo_loc"],
$myrow["state"], $myrow["country"], $myrow["zip"],
$myrow["phone"], $myrow["fax"], $myrow["e_mail"]);
}

So if (for instance) a user enters data for each field
except institution, how can I get the query to
disregard $institution?

Or if there is a better approach that I should be
using instead of the above, please let me know.

Thank you,

Bob

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text

-- 
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 exactly are /path/to/blah looking for? .h? .so? .a? what?!

2001-03-30 Thread Daevid Vincent

> I'm having difficulties with that line:
>
> ./configure --with-openlink=/path/to/openlink/
> --with-iodbc=/path/to/iodbc/

so I've tried every combination I can think of related to "iodbc" and
"openlink", and none of these are compiling. Every one results in "No such
file or directory"!

./configure --with-mysql=/usr/local \
--with-apache=../apache \
 #--with-iodbc=/usr/local/openlink/lib \
 #--with-iodbc=/usr/local/bin \
 #--with-iodbc=/usr/local \
 #--with-iodbc=/usr/local/include \
 #--with-iodbc=../libiodbc \
 #--with-openlink=/usr/local/openlink \
 #--with-openlink=/usr/local/openlink/lib

Can someone tell me what exactly is /path/to/openlink and /path/to/iodbc?
is it the .h file? is it the .so files? is it the .a files? what the heck is
it?

And why don't the INSTALL directions just tell me that? so if PHP expects to
find the .h file,
why don't they document it like: "--with-iodbc=/path/to/iodbc .h files" so
people aren't confused like me.

Please help. Thanks.

D.


-- 
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] DONE - Confuse w/ count function? / THANKS

2001-03-30 Thread Naga Sean

it's working now. Thanks Oson


--- "Oson, Chris M." <[EMAIL PROTECTED]>
> wrote:
>try:
>
>$strSQL = "SELECT COUNT(*) AS 'ItemCount' FROM my_table";
>$result = mysql_query($strSQL, $db);
>list($numberOfItems) = mysql_fetch_array($result);
>
>echo "The number of items in the database is: $numberOfItems\n";
>
>hTH
>
>-Original Message-
>From: Naga Sean [mailto:[EMAIL PROTECTED]]
>Sent: Friday, March 30, 2001 11:59 AM
>To: [EMAIL PROTECTED]
>Subject: [PHP-DB] Confuse w/ count function?
>
>
>I try to use this count function, but no matter how.
>
>I got this result from $t = Resource id #4
>
>
>
>
>
>$t = mysql_query("SELECT COUNT(*) FROM my_table",$db);
>
>echo($t);
>
>
>
>any comments ?
>
>
>
>-naga
>
>
>
>--- Andrei Skorokhod <[EMAIL PROTECTED]>
>
>> wrote:
>
>>if you just need the number
>
>>
>
>>SELECT COUNT(*) FROM table where 
>
>>
>
>>At 06:34 PM 3/30/2001 +0100, DC wrote:
>
>>>Hi All
>
>>>I cant quite work out how to count the number of rows in my mysql db that
>
>>>match a certain critieria and the show that number numericaly in my pages.
>
>>>
>
>>>Checked books, php.net etc.
>
>>>
>
>>>Any help is appreciated
>
>>>
>
>>>Yours Dave C
>
>>>
>
>>>
>
>>>
>
>>>--
>
>>>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]
>
>_
>www.kaskus.com - FREE EMAIL SERVICE
>
>-- 
>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]

_
www.kaskus.com - FREE EMAIL SERVICE

-- 
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] Confuse w/ count function?

2001-03-30 Thread Oson, Chris M.

try:

$strSQL = "SELECT COUNT(*) AS 'ItemCount' FROM my_table";
$result = mysql_query($strSQL, $db);
list($numberOfItems) = mysql_fetch_array($result);

echo "The number of items in the database is: $numberOfItems\n";

hTH

-Original Message-
From: Naga Sean [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 11:59 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Confuse w/ count function?


I try to use this count function, but no matter how.

I got this result from $t = Resource id #4





$t = mysql_query("SELECT COUNT(*) FROM my_table",$db);

echo($t);



any comments ?



-naga



--- Andrei Skorokhod <[EMAIL PROTECTED]>

> wrote:

>if you just need the number

>

>SELECT COUNT(*) FROM table where 

>

>At 06:34 PM 3/30/2001 +0100, DC wrote:

>>Hi All

>>I cant quite work out how to count the number of rows in my mysql db that

>>match a certain critieria and the show that number numericaly in my pages.

>>

>>Checked books, php.net etc.

>>

>>Any help is appreciated

>>

>>Yours Dave C

>>

>>

>>

>>--

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

_
www.kaskus.com - FREE EMAIL SERVICE

-- 
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 w/OOB

2001-03-30 Thread Patrick Brown

I have PHP compiled with OOB and Apache on one of my Linux bxes and it works
great. My problem is that I need to run PHP w/ OOB on a second box as a
stand alone app.

Here is a sample script:

#!/usr/local/bin/php


Here is the error:

X-Powered-By: PHP/4.0.4pl1
Content-type: text/html


Warning:  SQL error: [Easysoft ODBC (Client)]authentication error
number 87, SQL state S1000 in SQLConnect in ./nessusscan on line
5
Error: unable to connect to SQL server

This connect string works on all of my Apache servers. Is there some trick
to this when PHP is stand alone?

Thanks,
Pat



-- 
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] Confuse w/ count function?

2001-03-30 Thread Naga Sean

I try to use this count function, but no matter how.
I got this result from $t = Resource id #4


$t = mysql_query("SELECT COUNT(*) FROM my_table",$db);
echo($t);

any comments ?

-naga

--- Andrei Skorokhod <[EMAIL PROTECTED]>
> wrote:
>if you just need the number
>
>SELECT COUNT(*) FROM table where 
>
>At 06:34 PM 3/30/2001 +0100, DC wrote:
>>Hi All
>>I cant quite work out how to count the number of rows in my mysql db that
>>match a certain critieria and the show that number numericaly in my pages.
>>
>>Checked books, php.net etc.
>>
>>Any help is appreciated
>>
>>Yours Dave C
>>
>>
>>
>>--
>>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]

_
www.kaskus.com - FREE EMAIL SERVICE

-- 
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] count function?

2001-03-30 Thread DC

Cheers Brian
Thats sounds more like i am looking for
Although i have put the other code examples offered for this prob in my code
folder for later cause you never now when you'll need them.

Cheers

Dave C
""Brian S. Dunworth"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> At 10:06 AM 3/30/01 -0800, Larry Rivera wrote:
> >I think you have to run multiple queries, ie run some loop after finding
out
> >what topics you wil count from e==>
> >
> >run a select distinct to get the topics
> >run a while or for loop then run queries again like count(*) where
> >topic='$topic'
>
>Better yet (and less db-intensive), run a
>
> SELECT TOPIC,COUNT(*) FROM table_name
>WHERE condition
>GROUP BY TOPIC
>ORDER BY COUNT(*);
>
> That'll return:
>
>   TOPICCOUNT(*)
>    
>   Topic A 8
>   Topic B 3
>   Topic C 1
>   Topic D 0
>   Topic E 0
>
>
>   -
> Brian S. Dunworth
> Sr. Software Development Engineer
> Oracle Database Administrator
> The Printing House, Ltd.
>
> (850) 875-1500  x225
> <[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] count function?

2001-03-30 Thread Brian S. Dunworth

At 10:06 AM 3/30/01 -0800, Larry Rivera wrote:
>I think you have to run multiple queries, ie run some loop after finding out
>what topics you wil count from e==>
>
>run a select distinct to get the topics
>run a while or for loop then run queries again like count(*) where
>topic='$topic'

   Better yet (and less db-intensive), run a

SELECT TOPIC,COUNT(*) FROM table_name
   WHERE condition
   GROUP BY TOPIC
   ORDER BY COUNT(*);

That'll return:

  TOPICCOUNT(*)
   
  Topic A 8
  Topic B 3
  Topic C 1
  Topic D 0
  Topic E 0


  -
Brian S. Dunworth
Sr. Software Development Engineer
Oracle Database Administrator
The Printing House, Ltd.

(850) 875-1500  x225
<[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] connection to smtp

2001-03-30 Thread fam.paauwe

My php mail() function failes to make a connection to my local smtp server. Which 
server is best suitable and what do I have to change in my php.ini file so that the 
mail() function will operate correctly?

Does the mail() function work without an smtp server?
Do I have to have an internet connection to use the mail( ) function?

thanx,
ufo :-)



Re: [PHP-DB] MySQL max_connections

2001-03-30 Thread CC Zona

In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Lee Stretton) wrote:

> Got a bit of a problem with the number of users accessing a website
> driven by a MySQL database. I want to increase the number of allowed
> connections to the database,  I have found the variable to change
> (max_connections) but have not been able to find out how, or where to
> change it. So if anyone can let me know it would be very helpful.

  See in particular the 
section on "set-variable".

-- 
CC

-- 
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] count function?

2001-03-30 Thread DC

Thanks i will give that ago.

"Andrei Skorokhod" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> if you just need the number
>
> SELECT COUNT(*) FROM table where 
>
> At 06:34 PM 3/30/2001 +0100, DC wrote:
> >Hi All
> >I cant quite work out how to count the number of rows in my mysql db that
> >match a certain critieria and the show that number numericaly in my
pages.
> >
> >Checked books, php.net etc.
> >
> >Any help is appreciated
> >
> >Yours Dave C
> >
> >
> >
> >--
> >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] count function?

2001-03-30 Thread Larry Rivera

try mysql_num_rows function

-Original Message-
From: DC [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 9:34 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] count function?


Hi All
I cant quite work out how to count the number of rows in my mysql db that
match a certain critieria and the show that number numericaly in my pages.

Checked books, php.net etc.

Any help is appreciated

Yours Dave C



-- 
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] HELP: Eporting data from mySQL with PHP

2001-03-30 Thread Jeff Oien

> Hello,
> 
> I'm trying to figure out how to get the data out of a table in a format 
> which I can easily import into excel. I wanted to have tab delimited fields 
> enclosed by quotes. I'm not sure how to do this? I check the mySQL doc and 
> saw the mysqldump call but haven't found any mention of it in the PHP doc.
> 
> Any thoughts? code snippets?
> 
> Thanks in Advance,
> 
> Mark Rosenberg
> Michigan State

First you need this header:

header("Content-Type: application/vnd.ms-excel");

Then here is a message I got a while ago from Pierre-Yves Lemaire:

Hello,

The header will make netscape offer you a download of the file, and
IE will open it in a excell format.

For the display, just put your result in a nice html table and excell will
convert
it, it's quite simple.

print "";
print "Event";
... print all your header here

while ($row = mysql_fetch_array($result)) {
print "\n";
print "". $row['Event'] ."\n";
and so on...

}


hope it help,
py

-- 
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] count function?

2001-03-30 Thread Andrei Skorokhod

if you just need the number

SELECT COUNT(*) FROM table where 

At 06:34 PM 3/30/2001 +0100, DC wrote:
>Hi All
>I cant quite work out how to count the number of rows in my mysql db that
>match a certain critieria and the show that number numericaly in my pages.
>
>Checked books, php.net etc.
>
>Any help is appreciated
>
>Yours Dave C
>
>
>
>--
>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] count function?

2001-03-30 Thread DC

Ok i will get the books out and see if i can construct something.

Thanks for the tip...
 Dave C
""Larry Rivera"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I think you have to run multiple queries, ie run some loop after finding
out
> what topics you wil count from e==>
>
> run a select distinct to get the topics
> run a while or for loop then run queries again like count(*) where
> topic='$topic'
>
> etc
>
>
> then echo the result to each line
>
>
> -Original Message-
> From: DC [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 30, 2001 9:53 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] count function?
>
>
> Ok i think i need to expand my help request... my fault
>
> I have a db that uses ids for topics in a message board ie each topic has
> messages of various numbers in them.
>
> >From my select a topic page i hope to put the number of messages in the
> topic, so it visually looks like this sort of...
>
> topic 1 bb (5 posts)
> topic 2 ff (2 posts
>
> and so on.
>
> The only constant i can see in the tables is my posts table which
specifies
> the topic id number.
>
> So i think i am asking how can i count the number of the same topic id
> numbers and show that next to the relevant topic.
>
> Thanks Again
>
> Dave C
> "Andrei Skorokhod" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > if you just need the number
> >
> > SELECT COUNT(*) FROM table where 
> >
> > At 06:34 PM 3/30/2001 +0100, DC wrote:
> > >Hi All
> > >I cant quite work out how to count the number of rows in my mysql db
that
> > >match a certain critieria and the show that number numericaly in my
> pages.
> > >
> > >Checked books, php.net etc.
> > >
> > >Any help is appreciated
> > >
> > >Yours Dave C
> > >
> > >
> > >
> > >--
> > >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]
>



-- 
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] count function?

2001-03-30 Thread Larry Rivera

I think you have to run multiple queries, ie run some loop after finding out
what topics you wil count from e==>

run a select distinct to get the topics
run a while or for loop then run queries again like count(*) where
topic='$topic'

etc


then echo the result to each line


-Original Message-
From: DC [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 9:53 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] count function?


Ok i think i need to expand my help request... my fault

I have a db that uses ids for topics in a message board ie each topic has
messages of various numbers in them.

>From my select a topic page i hope to put the number of messages in the
topic, so it visually looks like this sort of...

topic 1 bb (5 posts)
topic 2 ff (2 posts

and so on.

The only constant i can see in the tables is my posts table which specifies
the topic id number.

So i think i am asking how can i count the number of the same topic id
numbers and show that next to the relevant topic.

Thanks Again

Dave C
"Andrei Skorokhod" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> if you just need the number
>
> SELECT COUNT(*) FROM table where 
>
> At 06:34 PM 3/30/2001 +0100, DC wrote:
> >Hi All
> >I cant quite work out how to count the number of rows in my mysql db that
> >match a certain critieria and the show that number numericaly in my
pages.
> >
> >Checked books, php.net etc.
> >
> >Any help is appreciated
> >
> >Yours Dave C
> >
> >
> >
> >--
> >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]




[PHP-DB] HELP: Eporting data from mySQL with PHP

2001-03-30 Thread Mark Rosenberg

Hello,

I'm trying to figure out how to get the data out of a table in a format 
which I can easily import into excel. I wanted to have tab delimited fields 
enclosed by quotes. I'm not sure how to do this? I check the mySQL doc and 
saw the mysqldump call but haven't found any mention of it in the PHP doc.

Any thoughts? code snippets?

Thanks in Advance,

Mark Rosenberg
Michigan State


-- 
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] count function?

2001-03-30 Thread DC

Ok i think i need to expand my help request... my fault

I have a db that uses ids for topics in a message board ie each topic has
messages of various numbers in them.

>From my select a topic page i hope to put the number of messages in the
topic, so it visually looks like this sort of...

topic 1 bb (5 posts)
topic 2 ff (2 posts

and so on.

The only constant i can see in the tables is my posts table which specifies
the topic id number.

So i think i am asking how can i count the number of the same topic id
numbers and show that next to the relevant topic.

Thanks Again

Dave C
"Andrei Skorokhod" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> if you just need the number
>
> SELECT COUNT(*) FROM table where 
>
> At 06:34 PM 3/30/2001 +0100, DC wrote:
> >Hi All
> >I cant quite work out how to count the number of rows in my mysql db that
> >match a certain critieria and the show that number numericaly in my
pages.
> >
> >Checked books, php.net etc.
> >
> >Any help is appreciated
> >
> >Yours Dave C
> >
> >
> >
> >--
> >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] count function?

2001-03-30 Thread DC

Hi All
I cant quite work out how to count the number of rows in my mysql db that
match a certain critieria and the show that number numericaly in my pages.

Checked books, php.net etc.

Any help is appreciated

Yours Dave C



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

2001-03-30 Thread Lee Stretton

Hi,

Got a bit of a problem with the number of users accessing a website
driven by a MySQL database. I want to increase the number of allowed
connections to the database,  I have found the variable to change
(max_connections) but have not been able to find out how, or where to
change it. So if anyone can let me know it would be very helpful.

Thanks in advance,

Lee Stretton

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

2001-03-30 Thread Johannes Janson

Hi,

take a look at
http://forums.devshed.com/showthread.php?threadid=12544&forumid=5
it might help.

"Mirko Cegledi" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi!
>
> I know its offtopic, but I don't want to join another mailinglist for this
> one question: I try to open a webpage per fopen, but it didn't work. We're
> using php3 and are behind a firewall. But the firewall isn't the problem,
is
> it? Its annoying, I've tried this for about four months now a couldn't
find
> a solution...
> Can anybody help me?
>
> regards,
>
> Mirko
>
>
> --
> 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] Problem with single qoutes

2001-03-30 Thread Yasuo Ohgaki

You shouldn't trust any inputs from users.

This section of PHP manual may be useful.
http://jp.php.net/manual/en/security.php
http://jp.php.net/manual/en/security.variables.php
http://jp.php.net/manual/en/function.addslashes.php

You may need to write your own addslashes and stripslashes depends on your DB.

--
Yasuo Ohgaki


""Matt Braynard"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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" once you
> check the box and submit. If you want to pull the story, just uncheck the
> box and submit. 
> Both Chris and Matt will get an email when a story has been confirmed. 
> Also, you can enter fresh stories directly into this page.
>
> 
> if (($submitcheck) and (($password == "x") or ($password == "x")))
> {
> if ($ready=="on")
> {
> $subject = "Confirmed: " . $top;
> $message .=  "\n \n Tease: \n";
> $message .= $tease;
> $message .=  "\n \n Body: \n";
> $message .= $body;
> $message .=  "\n \n Link: ";
> $message .=
> "http://www.well-rounded.com/games/e32k1/confirmnews.php?id=$id";
> mail("[EMAIL PROTECTED]", $subject, $message);
> mail("[EMAIL PROTECTED]", $subject, $message);
> $flag = "1";
> }
>
> require("/home/well-rounded.com/cgi-bin/dbinfo.inc");
> mysql_connect(localhost,$user,$password);
>
> @mysql_select_db($db) or die( "Unable to select database");
>
> $query="select * from e32k1_data where id = '$id'";
> $result=mysql_query($query);
>
> $num=mysql_numrows($result);
>
> if ($num == 0)
> {
> $query="insert into e32k1_data values('$type', '$id', '$filedate', '$top',
> '$tease', '$story', '$flag', '$flag2')";
>
> $result=mysql_query($query);
>
> mysql_close();
>
> } else {
> $query="update e32k1_data set type='n', id='$id', filedate='$filedate',
> top='$top', tease='$tease', body='$body', flag='$flag' where id = '$id'";
>
> $result=mysql_query($query);
>
> mysql_close();
>
> }
> ?>
> 
> 
> Mockup
>  Include("/home/well-rounded.com/html/games/e32k1/viewnews.php");
> ?>
> 
> Submitted Data
>
> 
> Enter the Info:
> Password:
> 
> 
> ID:
> 
> 
> FileDate:
> 
> Top:
> 
> Tease:
> 
> Body:
> 
>  echo $body;
> ?>
> 
> Ready for Prime Time?
> 
> 
> } else {
>
> if ($id)
> {
> require("/home/well-rounded.com/cgi-bin/dbinfo.inc");
> mysql_connect(localhost,$user,$password);
>
> @mysql_select_db($db) or die( "Unable to select database");
>
> $query="select * from e32k1_data where id = '$id'";
>
> $result=mysql_query($query) or die( "Unable to get the damn table");
>
> mysql_close();
>
> $type=mysql_result($result,0,"type");
> $id=mysql_result($result,0,"id");
> $filedate=mysql_result($result,0,"filedate");
> $top=mysql_result($result,0,"top");
> $tease=mysql_result($result,0,"tease");
> $body=mysql_result($result,0,"body");
> $flag=mysql_result($result,0,"flag");
> $flag2=mysql_result($result,0,"flag2");
>
> ?>
> 
> 
> Mockup
>  Include("/home/well-rounded.com/html/games/e32k1/viewnews.php");
> ?>
> 
>
> No submit, but an ID
> 
> Enter the Info:
> Password:
> 
> 
> ID:
> 
> 
> FileDate:
> 
> Top:
> 
> Tease:
> 
> Body:
>  echo $body;
> ?>
> 
> Ready for Prime Time?
> 
>
>  } else {
> ?>
>
> No Nothing
> 
> Enter the Info:
> Password:
> 
> 
> ID:
> 
> FileDate:
>  $today = getdate();
> $month = $today[month];
> $mday = $today[mday];
> $year = $today[year];
> echo "$month$mday$year";
> ?>>
> Top:
> 
> Tease:
> 
> 
> Body:
> 
> Ready for Prime Time?
> 
>
>  }
> }
> ?>
>
>
>





> --
> 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] functions and using vars outside of them

2001-03-30 Thread Yasuo Ohgaki

I think it's time to read the manual.
http://jp.php.net/manual/en/langref.php
http://jp.php.net/manual/en/language.variables.scope.php
http://jp.php.net/manual/en/functions.php

--
Yasuo Ohgaki


""olinux"" <[EMAIL PROTECTED]> wrote in message
000f01c0b838$e332a3c0$6401a8c0@amdk7">news:000f01c0b838$e332a3c0$6401a8c0@amdk7...
I am wondering how to use a variable that is generated by a function ($query)
If you would please look at:
http://phpbuilder.net/columns/laflamme20001016.php3?page=5
for an example of what i am trying to do.

the function will generate the query... but how do i make use of this?
i see that i will need to call the function
skill_search($skills);

but this does not make the variables inside the function available.

thanks much,
olinux



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

2001-03-30 Thread Mirko Cegledi

Hi!

I know its offtopic, but I don't want to join another mailinglist for this
one question: I try to open a webpage per fopen, but it didn't work. We're
using php3 and are behind a firewall. But the firewall isn't the problem, is
it? Its annoying, I've tried this for about four months now a couldn't find
a solution...
Can anybody help me? 

regards,

Mirko


-- 
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.net website down?

2001-03-30 Thread Matt Williams


> 
> Off subject but anyone know why php.net is down??
> 
no but uk.php.net is up if that's any good to you.

M@

-- 
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.net website down?

2001-03-30 Thread Chris Hall

Off subject but anyone know why php.net is down??

--
Chris Hall
sytems administrator
funnelbox mediaworks
[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]