[PHP-DB] Re: QUERY question (group by) - please help
I wrote: > For the C API see > http://www.mysql.com/doc/en/mysql_affected_rows.html > http://www.mysql.com/doc/en/mysql_num_rows.html > > The MySQL interface in every other language should have similar > functions available ... Ups, I _am_ in a PHP list/newgroup, so the more specific answer is, of course :-) http://www.php.net/manual/en/ref.mysql.php Some function names, though. Cheers, Martin -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: QUERY question (group by) - please help
Damir Dezeljin <[EMAIL PROTECTED]> wrote: > I want to calculate how many rows my MySQL query [...] returns. For the C API see http://www.mysql.com/doc/en/mysql_affected_rows.html http://www.mysql.com/doc/en/mysql_num_rows.html The MySQL interface in every other language should have similar functions available ... Ciao, Martin -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Session on PHP with MySQL
Dear all, I have some confusing about my script, this is story I have login page, and then the user got current page with various menu, but when user click one of menu, its has error mesage, here my script User ID atau Password yang anda masukkan tidak benar "; } else { echo " Welcome $name "; ?> | Upload File | Upload Nilai | Upload Jadwal Kuliah | Upload Jadwal Bimbingan | Upload News | Silabus Kuliah | Upload Artikel | Fun & Stuff | GuestBook | $action=preference>Preference | Menu Mahasiswa $query ="SELECT count(*) FROM news where byname='$name'"; $result = mysql_query($query); if (!$result) error_message(sql_error()); $query_data = mysql_fetch_row($result); $total_num_news = $query_data[0]; //if (!$total_num_news) error_message('Belum Pernah Posting'); echo "$name, Anda telah $total_num_news posting Break News"; function upload_file() { global $name; echo "oke pilih upload rek"; } function upload_nilai() { echo "oke pilih upload rek"; } function upload_jadwal_klh() { echo "oke pilih upload rek"; } function upload_jadwal_bmb() { echo "oke pilih upload rek"; } function upload_silabus() { echo "oke pilih upload rek"; } function news() { echo "isi news"; } function upload_stuff() { echo "oke pilih upload rek"; } function nilai() { echo "isi nilai"; } function jadwal() { echo "isi jadwal"; } function prefer() { global $action,$name; echo "$name ini isi preference"; } if ($action == 'preference') { prefer(); } elseif ($action == 'upload_file') { upload_file();} elseif ($action == 'upload_nilai') { upload_nilai();} elseif ($action == 'upload_jadwal_klh') { upload_jadwal_klh();} elseif ($action == 'upload_jadwal_bmb') { upload_jadwal_bmb();} elseif ($action == 'news') { news();} elseif ($action == 'upload_silabus') { upload_silabus();} elseif ($action == 'upload_artikel') { upload_artikel();} elseif ($action == 'upload_stuff') { upload_stuff();} ?> "; footer(); } ?> do I have mistake with my script, pls give me solution thanks all for yr help -- Warm regards, Afif mailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Session on PHP with MySQL
> I have some confusing about my script, this is story > > I have login page, and then the user got current page with various > menu, but when user click one of menu, its has error mesage, here my > script [snip] > do I have mistake with my script, pls give me solution > thanks all for yr help Yes, you have a mistake. In fact, you have two. The second one is that you never told us the error that you're getting. That would help us determine your problem. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] guestbook to db to email
> I am going to build some form elements to use as submitting to a DB for a > guestbook. Then display those inputs on another page as the entries to the > guestbook. I also want to send the information they submit to an email > address. I know how to manage sending simple form elements to an email > (email,subject,body) and so on. But with a guestbook there will be a few > more elements in the body of my email. > > Does anybody know of a very good way to format the body of an email when > form elements are sent into the body?? Form elements are just variables. Insert them into a string and make that your message... $message = "This is a message from {$_POST['name']}. They said this: {$_POST['message']}"; etc... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] guestbook to db to email
Bruce Levick - Vivamotion Hi, I am going to build some form elements to use as submitting to a DB for a guestbook. Then display those inputs on another page as the entries to the guestbook. I also want to send the information they submit to an email address. I know how to manage sending simple form elements to an email (email,subject,body) and so on. But with a guestbook there will be a few more elements in the body of my email. Does anybody know of a very good way to format the body of an email when form elements are sent into the body?? Cheers Bruce -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML tags in auth.php script
Check out the auto_prepend configuration option here: http://www.php.net/manual/en/configuration.directives.php I believe you can do this on a per-directory basis, but haven't tried it. -Steve On Friday, January 10, 2003, at 02:56 PM, [EMAIL PROTECTED] wrote: ThX John...One other question. I have an images folder and other 25 sub-folders underneath this folder. Each of this sub-folder is a web album with it own default index.html and thumbnails pics in it. My question is : Is there an easy way of having a folder level access control to the "IMAGES" folder and not having to get into each of those 25 index.html files and including my "auth.php" script in there. As of now any one can just type my whole URL upto the sub-folder and get to see my web pics. Thanks in advance. NT -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] HTML tags in auth.php script
You'll have to put something in each of the files you want to protect. It usually better to use an include() call to the same auth.php file for each of the files you want to protect. If you're looking to protect your .jpg or whatever image files, you can't unless they are outside of the web root or you use an .htaccess file. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 10, 2003 3:57 PM > To: 1LT John W. Holmes > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] HTML tags in auth.php script > > > > > ThX John...One other question. > I have an images folder and other 25 sub-folders underneath this folder. > Each of this sub-folder is a web album with it own default index.html > and thumbnails pics in it. > My question is : Is there an easy way of having a folder level access > control to the "IMAGES" folder > and not having to get into each of those 25 index.html files and > including my "auth.php" script in there. > As of now any one can just type my whole URL upto the sub-folder and get > to see my web pics. > > Thanks in advance. > NT > > > > > > > |-> > |(Embedded| > |image moved | > |to file: | > |pic16836.pcx)| > | | > |-> > >| > |"1LT John W. Holmes" <[EMAIL PROTECTED]> | > |01/10/2003 03:24 PM | > >| > > > > Please respond to "1LT John W. Holmes" <[EMAIL PROTECTED]> > > To: Narendra Talele/USINY/ABB@ABB_US01, [EMAIL PROTECTED] > cc: > Subject: Re: [PHP-DB] HTML tags in auth.php script > > Security Level:? Internal > > > > > Hello every one. I am still learning how PHP works. Can some one > answer > > this > > for me please. > > > > This piece of code here works fine ONLY without the HTML tags (The > > first line and the last lines in the code). > > The moment I add these lines I get the following error: (By the way I > > don't get these errors if I execute this script on UNIX) > > > > Warning: Cannot add header information - headers already sent by > (output > > started at c:\phpdev\www\public\auth.php:2) in > > c:\phpdev\www\public\auth.php on line 4 > > > > Warning: Cannot add header information - headers already sent by > > (output started at c:\phpdev\www\public\auth.php:2) in > > c:\phpdev\www\public\auth.php on line 5 > > Text to send if user hits Cancel button > > > > Basically what I am trying to do is to add > > this line to get a background image for this page "auth.php" in my > > images folder. > > > link=\"blue\" alink=\"red\" vlink=\"red\"> > > > > > > > > > if (!isset($_SERVER['PHP_AUTH_USER'])) { > >header('WWW-Authenticate: Basic realm="My Realm"'); > >header('HTTP/1.0 401 Unauthorized'); > >echo 'Text to send if user hits Cancel button'; > >exit; > > } else { > >echo "Hello {$_SERVER['PHP_AUTH_USER']}."; > >echo "You entered {$_SERVER['PHP_AUTH_PW']} as your > > password."; > > } > > ?> > > > > Absolutely anything outside of the tags is considered > output to > the browser. In order to use the header() function, you can't have any > output before the call to header(). > > If you want to add that text, then add it in where there is already > output > in the file. Add it to the echo for the "Text to send if ... " or where > your > "Hello ... " message is at. > > ---John Holmes... > > > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: mysql_errno() list?
Just use a combination of mysql_errno() and mysql_error(): echo mysql_errno() . ": " . mysql_error(). "\n"; Adam PS. Documentation always rocks! Hi guys, I've been playing with PHP for a while now, and love the mysql functions, but there's one thing I'd like to know... I want to check if a mysql error is a certain number, and thats all fair enough because every time i encounter an error I can write down what that error was. However, it would be handy if I could have my own define file with all the errors in. Can I ask if anyone has a list of errors and their numbers for mysql_errno? I've looked on the web and found a load of errors for the mysql daemon (the page told me to look in /usr/share/mysql/mysql_errors.txt) but this isnt the file I want as the errors there relate to the server and not errors with a query I'm running Thanks in advance for any help James Booker EMPICS Sports Photo Agency http://www.empics.com
Re: [PHP-DB] HTML tags in auth.php script
ThX John...One other question. I have an images folder and other 25 sub-folders underneath this folder. Each of this sub-folder is a web album with it own default index.html and thumbnails pics in it. My question is : Is there an easy way of having a folder level access control to the "IMAGES" folder and not having to get into each of those 25 index.html files and including my "auth.php" script in there. As of now any one can just type my whole URL upto the sub-folder and get to see my web pics. Thanks in advance. NT |-> |(Embedded| |image moved | |to file: | |pic16836.pcx)| | | |-> >| |"1LT John W. Holmes" <[EMAIL PROTECTED]> | |01/10/2003 03:24 PM | >| Please respond to "1LT John W. Holmes" <[EMAIL PROTECTED]> To: Narendra Talele/USINY/ABB@ABB_US01, [EMAIL PROTECTED] cc: Subject: Re: [PHP-DB] HTML tags in auth.php script Security Level:? Internal > Hello every one. I am still learning how PHP works. Can some one answer > this > for me please. > > This piece of code here works fine ONLY without the HTML tags (The > first line and the last lines in the code). > The moment I add these lines I get the following error: (By the way I > don't get these errors if I execute this script on UNIX) > > Warning: Cannot add header information - headers already sent by (output > started at c:\phpdev\www\public\auth.php:2) in > c:\phpdev\www\public\auth.php on line 4 > > Warning: Cannot add header information - headers already sent by > (output started at c:\phpdev\www\public\auth.php:2) in > c:\phpdev\www\public\auth.php on line 5 > Text to send if user hits Cancel button > > Basically what I am trying to do is to add > this line to get a background image for this page "auth.php" in my > images folder. > link=\"blue\" alink=\"red\" vlink=\"red\"> > > > > if (!isset($_SERVER['PHP_AUTH_USER'])) { >header('WWW-Authenticate: Basic realm="My Realm"'); >header('HTTP/1.0 401 Unauthorized'); >echo 'Text to send if user hits Cancel button'; >exit; > } else { >echo "Hello {$_SERVER['PHP_AUTH_USER']}."; >echo "You entered {$_SERVER['PHP_AUTH_PW']} as your > password."; > } > ?> > Absolutely anything outside of the tags is considered output to the browser. In order to use the header() function, you can't have any output before the call to header(). If you want to add that text, then add it in where there is already output in the file. Add it to the echo for the "Text to send if ... " or where your "Hello ... " message is at. ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML tags in auth.php script
> Hello every one. I am still learning how PHP works. Can some one answer > this > for me please. > > This piece of code here works fine ONLY without the HTML tags (The > first line and the last lines in the code). > The moment I add these lines I get the following error: (By the way I > don't get these errors if I execute this script on UNIX) > > Warning: Cannot add header information - headers already sent by (output > started at c:\phpdev\www\public\auth.php:2) in > c:\phpdev\www\public\auth.php on line 4 > > Warning: Cannot add header information - headers already sent by > (output started at c:\phpdev\www\public\auth.php:2) in > c:\phpdev\www\public\auth.php on line 5 > Text to send if user hits Cancel button > > Basically what I am trying to do is to add > this line to get a background image for this page "auth.php" in my > images folder. > link=\"blue\" alink=\"red\" vlink=\"red\"> > > > > if (!isset($_SERVER['PHP_AUTH_USER'])) { >header('WWW-Authenticate: Basic realm="My Realm"'); >header('HTTP/1.0 401 Unauthorized'); >echo 'Text to send if user hits Cancel button'; >exit; > } else { >echo "Hello {$_SERVER['PHP_AUTH_USER']}."; >echo "You entered {$_SERVER['PHP_AUTH_PW']} as your > password."; > } > ?> > Absolutely anything outside of the tags is considered output to the browser. In order to use the header() function, you can't have any output before the call to header(). If you want to add that text, then add it in where there is already output in the file. Add it to the echo for the "Text to send if ... " or where your "Hello ... " message is at. ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] HTML tags in auth.php script
PHP 4.2.3 APACHE 1.3.27 Windows 2K Hello every one. I am still learning how PHP works. Can some one answer this for me please. This piece of code here works fine ONLY without the HTML tags (The first line and the last lines in the code). The moment I add these lines I get the following error: (By the way I don't get these errors if I execute this script on UNIX) Warning: Cannot add header information - headers already sent by (output started at c:\phpdev\www\public\auth.php:2) in c:\phpdev\www\public\auth.php on line 4 Warning: Cannot add header information - headers already sent by (output started at c:\phpdev\www\public\auth.php:2) in c:\phpdev\www\public\auth.php on line 5 Text to send if user hits Cancel button Basically what I am trying to do is to add this line to get a background image for this page "auth.php" in my images folder. Hello {$_SERVER['PHP_AUTH_USER']}."; echo "You entered {$_SERVER['PHP_AUTH_PW']} as your password."; } ?> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] How to copy databases?
Choose the database from the list on the left, then do a dump of the database by selecting "Structure and Data". Then, create the new database and use the INSERT that was generated by your dump. Regards, Matthew Moldvan --- System Administrator Trilogy International, Inc http://www.trilogyintl.com/ecommerce/ --- -Original Message- From: Frank Peavy [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 2:18 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] How to copy databases? If I have a database "x" with populated tables and I would like to copy it to another empty database for Testing purposes, how is that done through phpMyAdmin? -- 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] QUERY question (group by) - please help
Well, I just assumed he was using PHP since this is a PHP list ... :) Otherwise, he'd have to use SELECT count() FROM ... Regards, Matthew Moldvan --- System Administrator Trilogy International, Inc http://www.trilogyintl.com/ecommerce/ --- -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 2:07 PM To: 'Matthew Moldvan'; 'Damir Dezeljin'; PHP-db list Subject: RE: [PHP-DB] QUERY question (group by) - please help Just a side note in case it's important, mysql_num_rows() is a PHP function, not a native MySQL function. Not being nitpicky, but it might be relevant if, for some reason, Damir cannot use PHP to obtain the number of rows. From the tone of the original post, it seems that might be a possibility. > -Original Message- > From: Matthew Moldvan [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 10, 2003 1:57 PM > To: 'Damir Dezeljin'; PHP-db list > Subject: RE: [PHP-DB] QUERY question (group by) - please help > > > Try mysql_num_rows() ... > http://www.php.net/manual/en/function.mysql-num-rows.php for the > documentation. > > Regards, > Matthew Moldvan > > --- > System Administrator > Trilogy International, Inc > http://www.trilogyintl.com/ecommerce/ > --- > > -Original Message- > From: Damir Dezeljin [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 10, 2003 1:01 PM > To: PHP-db list > Subject: [PHP-DB] QUERY question (group by) - please help > > > Hi. > > Maybe this isn't the correct list for asking the below question (if > so sorry ;) ). > > I want to calculate how many rows my MySQL query which uses 'GROUP BY' > returns. > > The query: > > SELECT > FROM test > WHERE (kid=1) OR (kid=2) OR (kid=4) > GROUP BY cid,aid; > > > Is it posible to get number of rows with such a query from > MySQL v3.23.49? > If it isn't posible ... is it posible in MySQL 4.x? > > I think a lot about this problem and I realize only the following > solution (to avoid returning a lot of rows in PHP): > CREATE TEMPORARY TABLE t (i INT); > INSERT INTO t (i) SELECT aid FROM > SELECT COUNT(*) FROM t; > DROP TABLE t; > > But this isn't so elegant. > > I want to do so on data generated by: > > CREATE TABLE test ( > kid INT, > aid INT, > cid INT > ); > > INSERT INTO test > (kid, aid, cid) VALUES > ( 1, 0, 1), > ( 2, 2, 2), > ( 1, 3, 2), > ( 2, 3, 2), > ( 4, 4, 2), > ( 4, 0, 3), > ( 3, 3, 4), > ( 4, 3, 4); > > > Regards, > Dezo > > > > -- > 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 Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] How to copy databases?
If I have a database "x" with populated tables and I would like to copy it to another empty database for Testing purposes, how is that done through phpMyAdmin? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] QUERY question (group by) - please help
Just a side note in case it's important, mysql_num_rows() is a PHP function, not a native MySQL function. Not being nitpicky, but it might be relevant if, for some reason, Damir cannot use PHP to obtain the number of rows. From the tone of the original post, it seems that might be a possibility. > -Original Message- > From: Matthew Moldvan [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 10, 2003 1:57 PM > To: 'Damir Dezeljin'; PHP-db list > Subject: RE: [PHP-DB] QUERY question (group by) - please help > > > Try mysql_num_rows() ... > http://www.php.net/manual/en/function.mysql-num-rows.php for the > documentation. > > Regards, > Matthew Moldvan > > --- > System Administrator > Trilogy International, Inc > http://www.trilogyintl.com/ecommerce/ > --- > > -Original Message- > From: Damir Dezeljin [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 10, 2003 1:01 PM > To: PHP-db list > Subject: [PHP-DB] QUERY question (group by) - please help > > > Hi. > > Maybe this isn't the correct list for asking the below question (if > so sorry ;) ). > > I want to calculate how many rows my MySQL query which uses 'GROUP BY' > returns. > > The query: > > SELECT > FROM test > WHERE (kid=1) OR (kid=2) OR (kid=4) > GROUP BY cid,aid; > > > Is it posible to get number of rows with such a query from > MySQL v3.23.49? > If it isn't posible ... is it posible in MySQL 4.x? > > I think a lot about this problem and I realize only the following > solution (to avoid returning a lot of rows in PHP): > CREATE TEMPORARY TABLE t (i INT); > INSERT INTO t (i) SELECT aid FROM > SELECT COUNT(*) FROM t; > DROP TABLE t; > > But this isn't so elegant. > > I want to do so on data generated by: > > CREATE TABLE test ( > kid INT, > aid INT, > cid INT > ); > > INSERT INTO test > (kid, aid, cid) VALUES > ( 1, 0, 1), > ( 2, 2, 2), > ( 1, 3, 2), > ( 2, 3, 2), > ( 4, 4, 2), > ( 4, 0, 3), > ( 3, 3, 4), > ( 4, 3, 4); > > > Regards, > Dezo > > > > -- > 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] QUERY question (group by) - please help
Try mysql_num_rows() ... http://www.php.net/manual/en/function.mysql-num-rows.php for the documentation. Regards, Matthew Moldvan --- System Administrator Trilogy International, Inc http://www.trilogyintl.com/ecommerce/ --- -Original Message- From: Damir Dezeljin [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 1:01 PM To: PHP-db list Subject: [PHP-DB] QUERY question (group by) - please help Hi. Maybe this isn't the correct list for asking the below question (if so sorry ;) ). I want to calculate how many rows my MySQL query which uses 'GROUP BY' returns. The query: SELECT FROM test WHERE (kid=1) OR (kid=2) OR (kid=4) GROUP BY cid,aid; Is it posible to get number of rows with such a query from MySQL v3.23.49? If it isn't posible ... is it posible in MySQL 4.x? I think a lot about this problem and I realize only the following solution (to avoid returning a lot of rows in PHP): CREATE TEMPORARY TABLE t (i INT); INSERT INTO t (i) SELECT aid FROM SELECT COUNT(*) FROM t; DROP TABLE t; But this isn't so elegant. I want to do so on data generated by: CREATE TABLE test ( kid INT, aid INT, cid INT ); INSERT INTO test (kid, aid, cid) VALUES ( 1, 0, 1), ( 2, 2, 2), ( 1, 3, 2), ( 2, 3, 2), ( 4, 4, 2), ( 4, 0, 3), ( 3, 3, 4), ( 4, 3, 4); Regards, Dezo -- 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] PHP and mySQL help!
If you update $date and nothing else on the page, are any of the other values in the URL (HREF) set? You have two separate forms. $date is in one and $host is in the other. However, all of the other variables in your URL (HREF) are from the second form where $host is. My guess is that since you have information coming from two separate forms, only data from one of the forms is being submitted. I might be totally wrong though because I don't know what happens when you use two forms on the same page, let alone two forms without names. If my theory is right, you should be able to use one form to encompass all of the data and use two separate tables within the form to format the controls on the page. Hope this helps. > -Original Message- > From: Dzung Nguyen [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 10, 2003 1:33 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] PHP and mySQL help! > > > Thanks for the quick reply! Perhaps I should describe my > problem more > specifically so that u could have a better idea: > > The code on PHP page to create forms for users to input field names: > > $tempdate = $date ; > $tempselect = $select ; > echo "Choose date > > > > > > > value=\"$tempdate\" size=17 > maxlength=10>" ; > echo "" ; > > $temphost = $host; > echo "Choose host > > > > > > > value=\"$temphost\" size=17 > maxlength=10>" ; > echo "" ; > > I then would concat the values to query the database as follow: > > echo " href=\"build_form.php?select=all&date=$date&host=$host&order=$ > order&ordertwo=$ordertwo&way=$way&waytwo=$waytwo\" > target=\"_top\"> > > My problem right now is that I can't seem to keep both > values. If one > value is update (host for example), the other value (date) is > no longer > set??? > Thanks again for your help. > > > -- > Dzung V. Nguyen email: [EMAIL PROTECTED] > Alpha Linux Group http://linux.iol.unh.edu/clp > InterOperability Laboratory > University of New Hampshire phone: (603) - 862 - 0401 > Durham, NH 03824fax : (603) - 862 - 4181 > > > > > -- > 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] PHP and mySQL help!
Thanks for the quick reply! Perhaps I should describe my problem more specifically so that u could have a better idea: The code on PHP page to create forms for users to input field names: $tempdate = $date ; $tempselect = $select ; echo "Choose date " ; echo "" ; $temphost = $host; echo "Choose host " ; echo "" ; I then would concat the values to query the database as follow: echo " My problem right now is that I can't seem to keep both values. If one value is update (host for example), the other value (date) is no longer set??? Thanks again for your help. -- Dzung V. Nguyen email: [EMAIL PROTECTED] Alpha Linux Group http://linux.iol.unh.edu/clp InterOperability Laboratory University of New Hampshire phone: (603) - 862 - 0401 Durham, NH 03824fax : (603) - 862 - 4181 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] PHP and mySQL help!
Are you sure $date and $host have a value? Is register globals on or off? Echo your query to the screen before you execute it to make sure it's what you think it is. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ > -Original Message- > From: Dzung Nguyen [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 10, 2003 12:45 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] PHP and mySQL help! > > Hi! I have a PHP page with a few text areas where users can enter > different combination of fields to query a mySQL database. An example > of a query would be like this: > > $query = "SELECT build_ids.build_id, build_ids.username, build_ids.host, > build_ids.configuration, build_ids.build, > build_ids.target, build_tests.input, > build_tests.output, build_tests.result, > build_tests.test_name, > build_tests.prms_id, build_ids.date FROM build_ids, > build_tests > WHERE build_ids.date like \"$date%\" and > build_ids.host like \"$host\" and > build_ids.build_id like build_tests.build_id"; > > The query would work if I use mySQL from command line, w/o using the > variable, but use the field names themselves. But wouldn't work when I > try to use variable like above and set the variables from a PHP page. > Anybody knows what's wrong w/ my code or could show me to some helpful > resources? Please reply to this email as I am not a subscriber of this > list. Thank you very much! I really appreciate your help! > > -- > Dzung V. Nguyen email: [EMAIL PROTECTED] > Alpha Linux Group http://linux.iol.unh.edu/clp > InterOperability Laboratory > University of New Hampshire phone: (603) - 862 - 0401 > Durham, NH 03824fax : (603) - 862 - 4181 > > > > > -- > 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 question (group by) - please help
Hi. Maybe this isn't the correct list for asking the below question (if so sorry ;) ). I want to calculate how many rows my MySQL query which uses 'GROUP BY' returns. The query: SELECT FROM test WHERE (kid=1) OR (kid=2) OR (kid=4) GROUP BY cid,aid; Is it posible to get number of rows with such a query from MySQL v3.23.49? If it isn't posible ... is it posible in MySQL 4.x? I think a lot about this problem and I realize only the following solution (to avoid returning a lot of rows in PHP): CREATE TEMPORARY TABLE t (i INT); INSERT INTO t (i) SELECT aid FROM SELECT COUNT(*) FROM t; DROP TABLE t; But this isn't so elegant. I want to do so on data generated by: CREATE TABLE test ( kid INT, aid INT, cid INT ); INSERT INTO test (kid, aid, cid) VALUES ( 1, 0, 1), ( 2, 2, 2), ( 1, 3, 2), ( 2, 3, 2), ( 4, 4, 2), ( 4, 0, 3), ( 3, 3, 4), ( 4, 3, 4); Regards, Dezo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PHP and mySQL help!
Hi! I have a PHP page with a few text areas where users can enter different combination of fields to query a mySQL database. An example of a query would be like this: $query = "SELECT build_ids.build_id, build_ids.username, build_ids.host, build_ids.configuration, build_ids.build, build_ids.target, build_tests.input, build_tests.output, build_tests.result, build_tests.test_name, build_tests.prms_id, build_ids.date FROM build_ids, build_tests WHERE build_ids.date like \"$date%\" and build_ids.host like \"$host\" and build_ids.build_id like build_tests.build_id"; The query would work if I use mySQL from command line, w/o using the variable, but use the field names themselves. But wouldn't work when I try to use variable like above and set the variables from a PHP page. Anybody knows what's wrong w/ my code or could show me to some helpful resources? Please reply to this email as I am not a subscriber of this list. Thank you very much! I really appreciate your help! -- Dzung V. Nguyen email: [EMAIL PROTECTED] Alpha Linux Group http://linux.iol.unh.edu/clp InterOperability Laboratory University of New Hampshire phone: (603) - 862 - 0401 Durham, NH 03824fax : (603) - 862 - 4181 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Examine button
Oh I see ... you need to use the http://www.trilogyintl.com/ecommerce/ --- -Original Message- From: Sabina Alejandr Schneider [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 11:54 AM To: Matthew Moldvan Subject: Re: [PHP-DB] Examine button Hello!! I will explain myself with an example. I just want a button as the button that is in the yahoo site to attach a file with the mail. When the user clicks that button it appears a window with the directory tree so the user can search the file and then press Ok in the window and then it appears the file path in a textbox. That's all I want to do. After that I can save the file path in the database. Is it clearer? Pease if not tell me... thank you very much!!! On Fri, 10 Jan 2003 10:56:20 -0500 Matthew Moldvan <[EMAIL PROTECTED]> wrote: >Sounds like maybe he/she wants to print a directory >listing and save it in a >database ... ? As good of a guess as I could figure ... >=P > >Regards, > Matthew Moldvan > >--- > System Administrator > Trilogy International, Inc > http://www.trilogyintl.com/ecommerce/ >--- > >-Original Message- >From: John W. Holmes [mailto:[EMAIL PROTECTED]] >Sent: Thursday, January 09, 2003 7:25 PM >To: 'Sabina A. Schneider'; [EMAIL PROTECTED] >Subject: RE: [PHP-DB] Examine button > > >> Hello everybody!!! I'm writing to you to ask if >>somebody knows how >can >> I do to emulate the examine button to retrive a file's >>path to save >that >> string in the database. Specifically, it's a photo, >>that've got to >search >> in the directory's window. Thanks in advance! > >Yeah, you probably got no response the first time you >posted this >because no one knows what you're talking about. Well, at >least I don't. >What does this have to do with PHP? > >---John W. Holmes... > >PHP Architect - A monthly magazine for PHP Professionals. >Get your copy >today. http://www.phparch.com/ > > > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > _ Tutopia - Acceso a Internet rápido, fácil y a los mejores precios. http://www.tutopia.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Stumped...
The source of my problem is that in my INSERT statement I was trying to enter a new row of data and not having data for every column. Basically, my table had 7 columns but in my INSERT I only had 5 columns of data to be put in. -Original Message- From: Matthew Moldvan [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 10:06 AM To: NIPP, SCOTT V (SBCSI); 'Hutchins, Richard'; '[EMAIL PROTECTED]' Subject: RE: [PHP-DB] Stumped... Out of curiosity, what was the solution? It's always good to learn from someone else's mistakes ... :) Regards, Matthew Moldvan --- System Administrator Trilogy International, Inc http://www.trilogyintl.com/ecommerce/ --- -Original Message- From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 1:42 PM To: 'Hutchins, Richard'; '[EMAIL PROTECTED]' Subject: RE: [PHP-DB] Stumped... Nevermind. I just stumbled across the nature of my problem on Deja.com. Thanks anyway and sorry for bugging you guys about what really was a simple problem. -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 12:36 PM To: NIPP, SCOTT V (SBCSI); '[EMAIL PROTECTED]' Subject: RE: [PHP-DB] Stumped... Post your SQL statement. > -Original Message- > From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 09, 2003 1:37 PM > To: '[EMAIL PROTECTED]' > Subject: [PHP-DB] Stumped... > > > I am getting an error that is proving very difficult to > isolate and > was hoping for help. The error is: Column count doesn't > match value count > at row 1. I would include the code, but it is about 350 > lines, and I am not > sure where to narrow it down at. Any ideas? Thanks. > > Scott Nipp > Phone: (214) 858-1289 > E-mail: [EMAIL PROTECTED] > Web: http:\\ldsa.sbcld.sbc.com > > > > -- > 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 Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Stumped...
Out of curiosity, what was the solution? It's always good to learn from someone else's mistakes ... :) Regards, Matthew Moldvan --- System Administrator Trilogy International, Inc http://www.trilogyintl.com/ecommerce/ --- -Original Message- From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 1:42 PM To: 'Hutchins, Richard'; '[EMAIL PROTECTED]' Subject: RE: [PHP-DB] Stumped... Nevermind. I just stumbled across the nature of my problem on Deja.com. Thanks anyway and sorry for bugging you guys about what really was a simple problem. -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 12:36 PM To: NIPP, SCOTT V (SBCSI); '[EMAIL PROTECTED]' Subject: RE: [PHP-DB] Stumped... Post your SQL statement. > -Original Message- > From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 09, 2003 1:37 PM > To: '[EMAIL PROTECTED]' > Subject: [PHP-DB] Stumped... > > > I am getting an error that is proving very difficult to > isolate and > was hoping for help. The error is: Column count doesn't > match value count > at row 1. I would include the code, but it is about 350 > lines, and I am not > sure where to narrow it down at. Any ideas? Thanks. > > Scott Nipp > Phone: (214) 858-1289 > E-mail: [EMAIL PROTECTED] > Web: http:\\ldsa.sbcld.sbc.com > > > > -- > 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 Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] which DBMS... MySQL or PostgreSQL
Why not direct your energy to an existing project? No sense in reinventing the wheel ... http://phprpg.org/. BTW, they are using MySQL, and it is open source. Regards, Matthew Moldvan --- System Administrator Trilogy International, Inc http://www.trilogyintl.com/ecommerce/ --- -Original Message- From: dufronte [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 2:48 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-DB] which DBMS... MySQL or PostgreSQL I want to start my Open-Source Project.. PHP-Based RPG Webgame in the next 2 months.. Till now, I still confuse in choosing 2 DBMS. MySQL and PostgreSQL. In your opinions, which DB should I use in consider that my Game will content a very big database including Player data, player Stats, Story and Scenario Database , etc. which one that easy to access, fast, and could maintain the sql file in small size.. and easy to backup Thanks for your advise. #Please join Open Community Forum... http://openity.tk #We're free to discuss anything, you're free to create your own topic in your own language. :D ---DuFronte--- http://kapsul.org No Fuckin' Shits !! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Authenticating through a php script
Sorry if this was already answered ... I think what Dave intends to do is give your students some kind of authentication (you can use a generic account), then have PHP connect to the database without the student ever seeing the login information (besides the script that is doing the basic authentication). Now, if PHP can connect to the types of databases your system would need to use is a different story ... you would probably have to ask the vendor about that. Regards, Matthew Moldvan --- System Administrator Trilogy International, Inc http://www.trilogyintl.com/ecommerce/ --- -Original Message- From: Jeremy Peterson [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 4:54 PM To: David Smith Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Authenticating through a php script Dave, I am afraid I am not communicating what I am trying to do. I have multiple databases that my library purchases. FirstSearch, Ebscohost, etc. These company's have there own authentication systems that I have no control over. A lot of them give user names and passwords that can access their secure database; however I will not give out this information to students. I want to design a system that will log the students on directly without them ever seeing the log in screen. A) Does this make sense in what I am trying to do? B) How can I do it? Jeremy At 12:38 PM 1/9/2003 -0700, David Smith wrote: >I haven't looked over all your code in detail, but the problem you >describe seems to be best solved using PHP Sessions. Sessions store data >between browser refreshes. You could store whether a user has been >authenticated via LDAP, and then on a subsequent page, you can reference >that information to determine how to proceed. > >Here's the doc: http://www.php.net/manual/en/ref.session.php > >--Dave > >On Thu, 2003-01-09 at 11:29, Jeremy Peterson wrote: > > David, > > > > I have ldap working, my problem is the second half of my question. > > > > The problem script workflow: > > 1. Authenticate on LDAP (Resolved) > > 2. Connect to different authenticated site for the user (Not sure > where to > > go now.) > > > > My guess was to send the post information to where the form action points > > to. Having done this, all I get is a blank page. I guess if PHP sends > > the post information then the client will be out of the authentication > > loop. There must be a better way. But I don't think I have enough > > information to know how to proceed. > > > > Somehow I have to get the browser to send the http post rather than > > PHP. Is this possible. > > > > Jeremy > > > > P.S. > > > > The script I am using right now incorporates Chris Alsop's class: > > > > > > > > >## Archive:c_http.class > >## Description:Basic http class functions (only post right now) > >## Author: Chris Alsop - [EMAIL PROTECTED] (rumblefiz) > >## Property Of:Everyone > >## Date Created: 07/01/2001 > >## Mod History:07/01/2001 Chris Alsop - Initial Coding > >## > > == > > class c_http { > > ## DECLARE CLASS VARIABLES > > var $QUERY_STRING; > > var $TARGET_DOMAIN; > > var $TARGET_FILE; > > var $RESPONSE; > > ## END CLASS VARIABLE DECLARATION - > > > > ## FUNCTION: c_http() > > ## ARGS: $psQueryString : String > > ## $psTargetDomain : String > > ## $psTargetFile : String > > ## > > function c_http($psQueryString, > >$psTargetDomain,$psTargetFile) { > > > >$this->QUERY_STRING = $psQueryString; > >$this->TARGET_DOMAIN = $psTargetDomain; > >$this->TARGET_FILE = $psTargetFile; > > } > > ## END FUNCTION: c_http() * > > > > ## FUNCTION: post() > > ## ARGS: None > > ## RETURNS: Boolean > > ## > > function post() { > >$qs = $this->QUERY_STRING; > >$domain = $this->TARGET_DOMAIN; > >$thefile = $this->TARGET_FILE; > >if(!$fp = fsockopen($domain,80)) { > > print "Socket not open"; > > return false; > > exit(); > >} > >$postData = "POST http://$domain/$thefile HTTP/1.0\r\n"; > >$postData .= "Content-type: > > application/x-www-form-urlencoded\r\n"; > >$postData .= "Content-length: ".strlen($qs)."\r\n\r\n"; > >$postData .= $qs; > > > >if(!fputs($fp,$postData)) { > > return false;
RE: [PHP-DB] Design suggestions - performance improvement
What does your SQL look like? I would say make sure you use UNIQUE if that doesn't mess up your implementation ... also, some code snippets would help if you need assistance. Regards, Matthew Moldvan --- System Administrator Trilogy International, Inc http://www.trilogyintl.com/ecommerce/ --- -Original Message- From: Matthew Nock [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 6:11 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Design suggestions - performance improvement Hi all, I am currently building a site for a cinema to display session times, film synopsis' etc... I have built the database as follows: TABLE: film_detail FilmID FilmName FilmRunTime FilmRating FilmSynopsis etc... TABLE session_data session_ID session_filmID session_StartTime session_Date The session_data table might contain a large number of records with the same film ID, and the same Start Date to cover a large number of sessions that we would have of the same film on the same day. I want to know what is the best way to retrieve this joint info from the DB. currently, I run a single select statement requesting the fields I want from both tables, where the session_Date equals a given date. This returns x number of rows, depending on the number of sessions for all films for that given day. However, this means that I am retrieving the Film Synopsis, cast, runtime etc multiple times... The data will be returned to the user as below: FILM TITLE (rating) session_times<--- will list all sessions - such as 8.45am, 10.15am, 12.00pm, 2.00pm etc etc FILM RUNTIME FILM CAST FILM SYNOPSIS is this an effective way to return to he data? or should I be using individual queries? Any comments or suggestions would be most appreciated.. Cheers, M@ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Examine button
Sounds like maybe he/she wants to print a directory listing and save it in a database ... ? As good of a guess as I could figure ... =P Regards, Matthew Moldvan --- System Administrator Trilogy International, Inc http://www.trilogyintl.com/ecommerce/ --- -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 7:25 PM To: 'Sabina A. Schneider'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Examine button > Hello everybody!!! I'm writing to you to ask if somebody knows how can > I do to emulate the examine button to retrive a file's path to save that > string in the database. Specifically, it's a photo, that've got to search > in the directory's window. Thanks in advance! Yeah, you probably got no response the first time you posted this because no one knows what you're talking about. Well, at least I don't. What does this have to do with PHP? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- 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] Will PHP work with IBM DB2 dbms?
Here's a a site that has the basics. I got a whole lot of matches with db2 php at google. Jeremy - Original Message - From: "Jack Schroeder" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 10, 2003 8:54 AM Subject: [PHP-DB] Will PHP work with IBM DB2 dbms? > Can anyone tell me if I can use PHP with a IBM DB2 database management > system, running on a AIX Unix server? > > Thanks > > Jack Schroeder > > > -- > 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] Will PHP work with IBM DB2 dbms?
http://www7b.software.ibm.com/dmdd/library/techarticle/scott/0614_scott.html is a good place to start. Also search google for db2 php...i got a lot of hits...Sorry if anyone get this msg twice. :) Jeremy - Original Message - From: "Jack Schroeder" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 10, 2003 8:54 AM Subject: [PHP-DB] Will PHP work with IBM DB2 dbms? > Can anyone tell me if I can use PHP with a IBM DB2 database management > system, running on a AIX Unix server? > > Thanks > > Jack Schroeder > > > -- > 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] Will PHP work with IBM DB2 dbms?
Can anyone tell me if I can use PHP with a IBM DB2 database management system, running on a AIX Unix server? Thanks Jack Schroeder -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] RE: [mysql - php] Newline to BR problem
It depends on how else you're going to use the info. If you're positive you're only ever going to display it on a webpage, you could go ahead and convert it before you insert the data. However, if you might want to use it for something else (include in an email, a report, whatever), it might be simpler to just store it with the \n's and do the conversion when it's pulled out for display online. -mo > -Original Message- > From: Ro Stonemountain [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 09, 2003 10:53 AM > To: [EMAIL PROTECTED] > Subject: [mysql - php] Newline to BR problem > > > I'm trying to place a text from a textfield into a database > and displaying > it on another page. All works fine and well but my problem is: > > If i place newline characters (press enter) in the forms > textfield they > don't show up on my display page. This is logical because > newlines are not > codes. So i must replace the newline thingies with > code. Should > this be done BEFORE i put the text in the database or AFTER i > put the text > in the database and what functions can i use > > Maybe it's a newbie question but it's on my mind for a few > days now and i > haven't found an answer yet, thanx! > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Authenticating through a php script
One reason you might be having difficulty is if the remote host does the basic authentication procedure of checking that the username/password is being submitted from a specific host or script (in which case it will see that you're attempting to submit the information from somewhere else and won't allow it). Have you verified with the owners of the remote application that what you are trying to do is not prevented? -mo > I am afraid I am not communicating what I am trying to do. > > I have multiple databases that my library purchases. FirstSearch, > Ebscohost, etc. These company's have there own > authentication systems that > I have no control over. A lot of them give user names and > passwords that > can access their secure database; however I will not give out this > information to students. I want to design a system that will log the > students on directly without them ever seeing the log in screen. > > A) Does this make sense in what I am trying to do? > B) How can I do it? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] mysql_errno() list?
Hi guys, I've been playing with PHP for a while now, and love the mysql functions, but there's one thing I'd like to know... I want to check if a mysql error is a certain number, and thats all fair enough because every time i encounter an error I can write down what that error was. However, it would be handy if I could have my own define file with all the errors in. Can I ask if anyone has a list of errors and their numbers for mysql_errno? I've looked on the web and found a load of errors for the mysql daemon (the page told me to look in /usr/share/mysql/mysql_errors.txt) but this isnt the file I want as the errors there relate to the server and not errors with a query I'm running Thanks in advance for any help James Booker EMPICS Sports Photo Agency http://www.empics.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php