[PHP-DB] One quick favor!!!!!!
When I get the data from the database and put it into the a href=/a code and use it in the post form, form ... . /fom. And so on. When I click the hyperlink to go to the next page, I saw the ugly code in the URL address section of the web browser's window. It said, http://*/test_final/cart/cart_index.php?menu=categorycategory=fruit%20 %20%20%20%20%20%20%20%20%PHPSESSID=0E731DE82293C1E5FE524448731F7006. How do I got rid of hte 20% data since I only have the word,fruit from the database table. I suspect that it have to do with the HTML form post and get method. How do I get rid of it??? Thanks! Scott -- 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] Search in a MySQL TEXT field
Hello, What is the better method for doing searchs in a TEXT field ? I have news in a web, but I think that use field LIKE '%foo%' can overload my server if the traffic grows up. Have you any reference about this? (urls, scripts, methods, documents...) Thanks -- Antonio Mármol Albert ( [EMAIL PROTECTED] ) http://www.infurma.es -- 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] Any word in how to connect to PPROGRESS db using PHP.
Hi all, Does any body have any information about how to access a PROGRESS database using PHP? I know this has been asked before and I just want to be upto date. Thanks, -- === Hector M Banda Fax: (425) 790-6379 Irvine Ca, 92618 === -- 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 email article to a friend
I'm a newbie and have only worked with php to send email from webform input. I now want to add a new feature to my website: Email article to a friend and I don't know where to start. I want to add this feature to webpages that are dynamically created from a mysql database. How do I pull this same info. and send it in an email? I'm desperately looking for help at the absolute basic level. I'm not even clear on how I would grab the current url from which I want to email. Please respond to my email directly as I'm on the digest version. I'll print a summary and post to the list afterwards. Thank you, Shawna -- 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] db abstraction: sql design
Hi! I'm new to this mailing list. So if this post is off-topic, please tell me and I will try to post it in other lists. I'm currently developing an intranet solutions targeted to run with several different SQL database system such as MySQL, PostgreSQL, Oracle, Microsoft SQL Server and so on. For the database abstraction I use the abstraction layer provided by the PEAR class collection. And for the design of the tables I use a software called DeZign for database (very good, by the way; more information at http://www.datanamic.com/). With this software it's possible to develop tables and to export a SQL script for creating those tables on several different database server, especially those mentioned above. The problem I have is how to develop SQL querys (SELECT, INSERT, UPDATE) that are compatible with all the SQL database I wrote about before. Does anyone know whether a software like DeZign is also available for the development of SQL querys? Or is there any _good_ resource on the internet comparing the syntax of _all_ the SQL implementations of databases? I didn't find any such information at all. Thanks a lot in advance! Michael -- 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] db abstraction: sql design
Hello Michael, On 19-Jun-01 23:57:31, you wrote: I'm new to this mailing list. So if this post is off-topic, please tell me and I will try to post it in other lists. I'm currently developing an intranet solutions targeted to run with several different SQL database system such as MySQL, PostgreSQL, Oracle, Microsoft SQL Server and so on. For the database abstraction I use the abstraction layer provided by the PEAR class collection. And for the design of the tables I use a software called DeZign for database (very good, by the way; more information at http://www.datanamic.com/). With this software it's possible to develop tables and to export a SQL script for creating those tables on several different database server, especially those mentioned above. The problem I have is how to develop SQL querys (SELECT, INSERT, UPDATE) that are compatible with all the SQL database I wrote about before. Does anyone know whether a software like DeZign is also available for the development of SQL querys? Or is there any _good_ resource on the internet comparing the syntax of _all_ the SQL implementations of databases? I didn't find any such information at all. You may want to try Metabase instead of PEAR because it helps you to write database independent code that works seeminglessly with many different databases so you don't have to rewrite your queries for each database you want to support. Metabase is also able to abstract the creation of databases and their tables, fields, indexes and sequences. You only need to describe your database in a specific XML format. Metabase manager is able to interpret your schema descriptions and install it in your database of choice. If later you decide to change your schema, Metabase manager is also able to apply the changes without disturbing the data inserted after you installed the database for the first time or updated the schema for the last time. Metabase is freely available and you can download it from here: http://phpclasses.UpperDesign.com/browse.html/package/20 Watch also for ready to use components based on Metabase: Query result table display class http://phpclasses.UpperDesign.com/browse.html/package/130 Database access class http://phpclasses.UpperDesign.com/browse.html/package/231 Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp -- -- 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] mssql_connect() function not found when I load the page...
Hi, I am running PHP with apache as server at Windows 98 platform. When I open a page I write that will connect to Microsoft SQL Server 7.0 in my intranet, I get the error : mssql_connect( ) function not found. Could someone tell me how to solve this problem? Thanks. lwneo. -- 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] charts
Hi All! Is it possible to create charts/ histograms using PHP ? Can somebody lead me to a resource where I can find some information on this Thanks Pankaj Ahuja -- 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] mssql_fetch_array problem
Thanks for all your answers, but, they still seem not to work. In my query, the value of countryname is retrieved as expected but the value of countryid is not. There seems to be no value retrieved for countryid. I am using PHP4 on IIS4 on an NT machine with SQL Server 7 as the database. countryname is of type varchar while countryid is type int, indentity, auto_increment. I tried listing them by printing the resultset but countryid still does not have any value. This could be a quirk that some of you experienced and I sure would like to hear how you overcame this. Thanks. I am posting again the code snippet below: ? $country_sql = select countryname, countryid from TBL_COUNTRY; if ($country_query = mssql_query($country_sql)) { while ($myrow = mssql_fetch_array($country_query)) { $countryid = $myrow[countryid]; $countryname = $myrow[countryname]; print countryid is . $countryid . ,countryname is . $countryname . br; } } ? -- 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] mssql_fetch_array problem
Thanks for all your answers, but, they still seem not to work. In my query, the value of countryname is retrieved as expected but the value of countryid is not. There seems to be no value retrieved for countryid. I am using PHP4 on IIS4 on an NT machine with SQL Server 7 as the database. countryname is of type varchar while countryid is type int, indentity, auto_increment. I tried listing them by printing the resultset but countryid still does not have any value. This could be a quirk that some of you experienced and I sure would like to hear how you overcame this. I am posting again the code snippet below: ? $country_sql = select countryname, countryid from TBL_COUNTRY; if ($country_query = mssql_query($country_sql)) { while ($myrow = mssql_fetch_array($country_query)) { $countryid = $myrow[countryid]; $countryname = $myrow[countryname]; print countryid is . $countryid . ,countryname is . $countryname . br; } } ? Thanks. -- 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 accessing oracle
If you use PHP on Windows NT, you have to uncomment extension=php_oracle.dll in your php.ini file, and copy php_oracle.dll to winnt\system32. If you have installed Oracle8 client, you can also use php_oci8.dll (even with a 7.3 database), with the OCILogon functions, etc... I don't know what to do on another platform, sorry. Best regards, Philippe Martin Langlois [EMAIL PROTECTED] a écrit dans le message news: 9go9fn$1e3$[EMAIL PROTECTED] I want to make a query from a oracle database with php. That's what I do: $link=Ora_Logon(user,1234); $query = select * from sales; $cursor = ora_do($link,$query); while(ora_fetch($cursor)) { print $cursor; } I have an arror, it's doesn't recongnize ora_logon() function. Do i have to include something special? -- Martin Langlois Programmeur-analyste Inter.net Canada 5252, boul. de Maisonneuve Ouest bureau 200 Montréal,Qc H4A 3S5 http://www.ca.inter.net -- 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 accessing oracle
If you use PHP on Windows NT, you have to uncomment extension=php_oracle.dll in your php.ini file, and copy php_oracle.dll to winnt\system32. If you have installed Oracle8 client, you can also use php_oci8.dll (even with a 7.3 database), with the OCILogon functions, etc... I don't know what to do on another platform, sorry. Best regards, Philippe Martin Langlois [EMAIL PROTECTED] a écrit dans le message news: 9go9fn$1e3$[EMAIL PROTECTED] I want to make a query from a oracle database with php. That's what I do: $link=Ora_Logon(user,1234); $query = select * from sales; $cursor = ora_do($link,$query); while(ora_fetch($cursor)) { print $cursor; } I have an arror, it's doesn't recongnize ora_logon() function. Do i have to include something special? -- Martin Langlois Programmeur-analyste Inter.net Canada 5252, boul. de Maisonneuve Ouest bureau 200 Montréal,Qc H4A 3S5 http://www.ca.inter.net -- 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] mssql_fetch_array - still not working fine
Thanks for all your answers, but, they still seem not to work. In my query, the value of countryname is retrieved as expected but the value of countryid is not. There seems to be no value retrieved for countryid. I am using PHP4 on IIS4 on an NT machine with SQL Server 7 as the database. countryname is of type varchar while countryid is type int, indentity, auto_increment. I tried listing them by printing the resultset but countryid still does not have any value. This could be a quirk that some of you experienced and I sure would like to hear how you overcame this. I am posting again the code snippet below: ? $country_sql = select countryname, countryid from TBL_COUNTRY; if ($country_query = mssql_query($country_sql)) { while ($myrow = mssql_fetch_array($country_query)) { $countryid = $myrow[countryid]; $countryname = $myrow[countryname]; print countryid is . $countryid . ,countryname is . $countryname . br; } } ? Thanks. -- 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 email article to a friend
You can query your database to extract those info, compose your email and use mail( ) function to send it. At 02:22 PM 6/19/01 -0400, [EMAIL PROTECTED] wrote: I'm a newbie and have only worked with php to send email from webform input. I now want to add a new feature to my website: Email article to a friend and I don't know where to start. I want to add this feature to webpages that are dynamically created from a mysql database. How do I pull this same info. and send it in an email? I'm desperately looking for help at the absolute basic level. I'm not even clear on how I would grab the current url from which I want to email. Please respond to my email directly as I'm on the digest version. I'll print a summary and post to the list afterwards. Thank you, Shawna -- 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] - Lester June Cabrera Chief Web Programmer I-Quest Corporation Tel: (632) 867 8150 local 302 or 309 Fax: (63 2) 867 8077 E-mail: [EMAIL PROTECTED] Visit the most comprehensive on-line business travel resource at http://www.worldroom.com Successful events start here. Visit http://www.worldroomevents.com . The one-stop online exchange for event planners and suppliers to the MICE industry. -- 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] newbie: Trying to select a database in php
Im using win2k and php to retrieve and dipslay database records, however whenever the page is loaded in a browser I get the following error (the line in question is in bold) Fatal error: Call to undefined function: msql_select_db() in D:\ASP\test\php\default.php on line 18 The code I am using is below ?php $connect = mysql_connect(); if(!$connect){ echo Could not etsablish connection to mySQL!; exit; } $database = dvd_listings; $dbb = msql_select_db($database,$connect) or die(Unable to select Database!); $sql = SELECT * FROM dvd_main; $sql_result = mysql_query($sql,$connect); echo table border=1; echo trtdDVD Title/td/tr; while($row = mysql_fetch_array($sql_result)){ $title = $row[main_title]; echo trtd$title/td/tr; } echo /table; mysql_free_result($sql_result); mysql_close($connection); ? Any help would be appreciated
RE: [PHP-DB] db abstraction: sql design
Hi Michael, since U R using an abstraction-layer, most of Ur problems should be solved. U should have no problems if U reduce Ur SQL-statements to SQL92-standard. Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - ___ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de ___ -Original Message- From: Michael P. Mehl [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 19, 2001 11:35 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] db abstraction: sql design Hi! I'm new to this mailing list. So if this post is off-topic, please tell me and I will try to post it in other lists. I'm currently developing an intranet solutions targeted to run with several different SQL database system such as MySQL, PostgreSQL, Oracle, Microsoft SQL Server and so on. For the database abstraction I use the abstraction layer provided by the PEAR class collection. And for the design of the tables I use a software called DeZign for database (very good, by the way; more information at http://www.datanamic.com/). With this software it's possible to develop tables and to export a SQL script for creating those tables on several different database server, especially those mentioned above. The problem I have is how to develop SQL querys (SELECT, INSERT, UPDATE) that are compatible with all the SQL database I wrote about before. Does anyone know whether a software like DeZign is also available for the development of SQL querys? Or is there any _good_ resource on the internet comparing the syntax of _all_ the SQL implementations of databases? I didn't find any such information at all. Thanks a lot in advance! Michael -- 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] Your Internet Education!
Take our course in computers and the Internet; and then we'll show you how to build a business with your new skills. Just hit: mailto:[EMAIL PROTECTED]?Subject=Education To be removed from this list, hit: mailto:[EMAIL PROTECTED]?Subject=Remove -- 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] mssql_connect() function not found when I load the page...
snip mssql_connect( ) function not found. Could someone tell me how to solve this problem? /snip You need to recompile PHP to include MSSQL support Sincerely, Craig Vincent -- 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]
AW: [PHP-DB] mssql_connect() function not found when I load the page...
You need to uncomment the mssql.dll (or something called like this) in your php.ini (In the section Windows DLL's). Greetings, Stefan -Ursprüngliche Nachricht- Von: lwneo [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 20. Juni 2001 06:21 An: [EMAIL PROTECTED] Betreff: [PHP-DB] mssql_connect() function not found when I load the page... Hi, I am running PHP with apache as server at Windows 98 platform. When I open a page I write that will connect to Microsoft SQL Server 7.0 in my intranet, I get the error : mssql_connect( ) function not found. Could someone tell me how to solve this problem? Thanks. lwneo. -- 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] mssql_fetch_array problem
Ok lets start from the beginning, apologies if this these have been mentioned previousely I haven't seent the rest of the thread: * Make sure 'countryid' is spelled the same in your script as it is in your DB table (I've done this and spent hours banging my head against a brick wall) * Ensure they both have the same case. * Ensure 'countryid' actually contains a value in the DB by looking it up via the command line or your GUI. These may sound trivial but think about it, why should some values return when another does not? What are the differences between the datatypes that are and are not returned? Compare them and try altering the differences you find to see what happens. Good luck! Russ On Wed, 20 Jun 2001 13:17:23 +0800 Jennifer Arcino Demeterio [EMAIL PROTECTED] wrote: Thanks for all your answers, but, they still seem not to work. In my query, the value of countryname is retrieved as expected but the value of countryid is not. There seems to be no value retrieved for countryid. I am using PHP4 on IIS4 on an NT machine with SQL Server 7 as the database. countryname is of type varchar while countryid is type int, indentity, auto_increment. I tried listing them by printing the resultset but countryid still does not have any value. This could be a quirk that some of you experienced and I sure would like to hear how you overcame this. Thanks. I am posting again the code snippet below: ? $country_sql = select countryname, countryid from TBL_COUNTRY; if ($country_query = mssql_query($country_sql)) { while ($myrow = mssql_fetch_array($country_query)) { $countryid = $myrow[countryid]; $countryname = $myrow[countryname]; print countryid is . $countryid . ,countryname is . $countryname . br; } } ? -- 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] #---# Believe nothing - consider everything Russ Michell Anglia Polytechnic University Webteam e: [EMAIL PROTECTED] w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #---# -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Query through two tables
Hi! I've got two tables: CREATE TABLE users ( user_id bigint(20) unsigned DEFAULT '0' NOT NULL, contact_id bigint(20) unsigned DEFAULT '0', user_login varchar(100) NOT NULL, PRIMARY KEY (user_id), UNIQUE UC_user_id (user_id) ); CREATE TABLE contacts ( contact_id bigint(20) unsigned DEFAULT '0' NOT NULL, contact_type varchar(100) NOT NULL, contact_value mediumtext, PRIMARY KEY (contact_id, contact_type), KEY idx_contacts (contact_id, contact_type) ); In the table users the field user_id is a unique key for every user, user_login contains an identification string to login into an system. contact_id is the id of the entries in the table contacts which contain more information about the user. The special thing about this is that there are more than one entries in the table contacts for each user. For example to store the prename of a user, the following entry exists: INSERT INTO contacts VALUES ( '1', 'person/prename', 'Michael P.'); At the SAME time there's a second entry in the table contacts for the user's surname: INSERT INTO contacts VALUES ( '1', 'person/surname', 'Mehl'); The problem: How is it possible -- for example using temporary tables -- to do a query whose result is a table with the fields user_login and two other fields user_prename and user_surname containing the corresponding values from the table contacts. Best regards and thanks in advance... Michael -- 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]
AW: [PHP-DB] newbie: Trying to select a database in php
Try it with mysql_select_db($database,$connect) instead of msql_select_db($database,$connect) :-) msql is a different Database System (in general, it is a lot older than mysql I think) Stefan -Ursprüngliche Nachricht- Von: Paul Lockyer [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 20. Juni 2001 10:07 An: [EMAIL PROTECTED] Betreff: [PHP-DB] newbie: Trying to select a database in php Im using win2k and php to retrieve and dipslay database records, however whenever the page is loaded in a browser I get the following error (the line in question is in bold) Fatal error: Call to undefined function: msql_select_db() in D:\ASP\test\php\default.php on line 18 The code I am using is below ?php $connect = mysql_connect(); if(!$connect){ echo Could not etsablish connection to mySQL!; exit; } $database = dvd_listings; $dbb = msql_select_db($database,$connect) or die(Unable to select Database!); $sql = SELECT * FROM dvd_main; $sql_result = mysql_query($sql,$connect); echo table border=1; echo trtdDVD Title/td/tr; while($row = mysql_fetch_array($sql_result)){ $title = $row[main_title]; echo trtd$title/td/tr; } echo /table; mysql_free_result($sql_result); mysql_close($connection); ? Any help would be appreciated -- 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 email article to a friend
At 20.06.2001 08:52, you wrote: You can query your database to extract those info, compose your email and use mail( ) function to send it. that is _not_ a wise way to do it, you should include some form of restrictions on how many emails can be sent to a single account within X minutes for example. Further you should restrict by HTTP_REFERER (yep it's poor, but it's better than nothing) so that a automated script can't use your email-article-to-a-friend function to spam thousands of people without any work... There are quite a few considerations to take into account when writing a email-article-to-a-friend function, just to be on the safe side... -- Andreas D Landmark / noXtension Real Time, adj.: Here and now, as opposed to fake time, which only occurs there and then. -- 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] newbie: Trying to select a database in php
At 20.06.2001 09:06, you wrote: Im using win2k and php to retrieve and dipslay database records, however whenever the page is loaded in a browser I get the following error (the line in question is in bold) Fatal error: Call to undefined function: msql_select_db() in D:\ASP\test\php\default.php on line 18 Spelling mistake I take it, the error refers to msql while you're using mYsql... -- Andreas D Landmark / noXtension Real Time, adj.: Here and now, as opposed to fake time, which only occurs there and then. -- 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] A L'AIDE !!!!
Bonjour, je suis un tout nouveau programmeur PHP. Mais aujourd'hui je bloque sur ce problème : print(option value=\Choisissez\Choisissez/option); while ($ligne = mysql_fetch_array($resultat)) { echo option name=\ville\ value=\; echo $ligne[ville]; echo \; echo $ligne[ville]; echo /option\n; } Le paramètre qui est envoyé à la page des résultats doit être le nom de la ville que l'on a préalablement choisi dans le menu déroulant. Or, je ne peut mettre en même temps $ligne[ville] pour la valeur du menu déroulant et $ligne[ville] pour l'affichage dans le menu déroulant. Quelqu'un peut-il me donner un coup de pouce ? Marc -- 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] Any word in how to connect to PPROGRESS db usingPHP.
Hi there, We are currently getting PHP to talk to Progress. How you do it is thru ODBC. You have to get a ODBC driver for Progress which you can get straight from Progress (Merant driver) for $100 or you can get one from www.openlinksw.com for $500 with multitier capabilities. I will warn you, the current ODBC drivers out there for Progress are buggy. For some reason, when you add new records in the db it will not trigger. So you can't do autoincrement with the Progress DB. You would have to turn off triggers and code in your PHP to find the last number used in the table (if you wanted an autoincrementing id number which you almost always do). There is also an option of writing a java that does keeps track of the trigger for you but we don't do java just yet and it sounds complicated. Let me know if you pursue that what your code is. Just keep these things in mind when you are designing your db. There's also the problem with getting the last used record in the db and just adding one. What if a person with id of 50 does a bunch of stuff, you have them saved in other table as 50 doing this and that. Then person 50 wants to be deleted. So you delete them and then when you add a new person since 49 is the last used number person 51 gets added as 50. NOw when person 51 needs things recorded in the other tables his data gets mixed up with the old person 50. Have I confused you yet? I confused me! The best solution is to keep a table called id where you keep track of every id number ever used and don't delete from it just becvause the number may get deleted in another table. Hope I haven't totally turned you around! :) Angie Hector M Banda [EMAIL PROTECTED] 06/19/01 01:09PM Hi all, Does any body have any information about how to access a PROGRESS database using PHP? I know this has been asked before and I just want to be upto date. Thanks, -- === Hector M Banda Fax: (425) 790-6379 Irvine Ca, 92618 === -- 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] mssql_fetch_array problem
Jennifer, Try this code..I am using the same stuff as you with the exception of mysql instead of sql..but it may still work: ? $country_sql = select countryname co_name_val, countryid co_id_val from TBL_COUNTRY; if ($country_query = mssql_query($country_sql)) { while ($myrow = mssql_fetch_array($country_query)) { $countryid = $myrow[co_id_val]; $countryname = $myrow[co_name_val]; print countryid is . $countryid . ,countryname is . $countryname . br; } } ? It's kind of a save as type of statment but it works for me! I've had no problems with that sql statement. Angie Jennifer Arcino Demeterio [EMAIL PROTECTED] 06/20/01 12:17AM Thanks for all your answers, but, they still seem not to work. In my query, the value of countryname is retrieved as expected but the value of countryid is not. There seems to be no value retrieved for countryid. I am using PHP4 on IIS4 on an NT machine with SQL Server 7 as the database. countryname is of type varchar while countryid is type int, indentity, auto_increment. I tried listing them by printing the resultset but countryid still does not have any value. This could be a quirk that some of you experienced and I sure would like to hear how you overcame this. Thanks. I am posting again the code snippet below: ? $country_sql = select countryname, countryid from TBL_COUNTRY; if ($country_query = mssql_query($country_sql)) { while ($myrow = mssql_fetch_array($country_query)) { $countryid = $myrow[countryid]; $countryname = $myrow[countryname]; print countryid is . $countryid . ,countryname is . $countryname . br; } } ? -- 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] MSSQL limit capability
Hi, Having used to the wonderful features in MySQL on the limit, how could I do the same on MSSQL? The table I'm trying to retrieve is kinda big - like 500,000 records - and would like to read them in chunks. Thanks. Dreamvale -- 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] Date field
Hi, Can someone tell me how do stote date field in MySQL DB ? Thanks, Rosen 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] flush privileges
Hello php-db, what kind of privileges i should have if i want to run 'flush privileges' ? ,,, (@-@) +==---o00(_)00o-==+ It is better to be defeated on principle than to win on lies. --Arthur Calwell -- Best regards, andRie -- 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 insert into Access autonumber, get inserted value back?
I have an Access database that PHP will be accessing. (I'm assuming I have to do this via ODBC and the Unified ODBC functions in PHP, but correct me if I'm wrong.) The PHP script will be inserting new records into the Access database. The primary key in many of the tables in the Access database is an autonumber field. Thus, the key value will be unknown until after I make the insert call. My question: Either before or after the insert, is there any way for me to find out what the key value is? I know if I were using MySQL, I could call the mysql_insert_id() function to get this information. This is critical to me, because my project entails maintaining a new database (actually, a MySQL database) that contains the same information as an existing Access database. Changes will be made to the new database, which then need to be propagated to the Access database. In order for these databases to remain synchronized, I need the primary keys to be the same in both databases, clearly. Thanks for any suggestions! - Ken [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] imap problem
Hi, I am developing an email reader for IMAP/POP3. But I am getting the following error when trying to excute the file. I have removed the comment from the IMAP extensions in the php.ini. Fatal error: Call to undefined function: imap_open() in conn.inc on line 6 Contents of conn.inc is as below : ? $username = whoosh_vc; $password = crossroads; $mailserver = {pop.postmark.net/pop3:110}INBOX; $link = imap_open($mailserver,$username,$password); ? Please help. Thanx in advance. vipin chandran [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] php accessing oracle
Hi! did you compile php with oci or ora functions? this is a really good tutorial... http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/page1.html here are the commands I use .. you need to adjust for versions... php config ./configure --with-apache=../apache_1.3.19 --with-oracle=/opt/oracle/product/8.1.6/ --with-oci8=/opt/oracle/product/8.1.6/ --enable-sigchild --enable-track-vars apache config --- remove the php3/php4 respectively ./configure --prefix=/usr/local/apache --with-layout=GNU --enable-shared=max --enable-module=most --activate-module=src/modules/php4/libphp4.a --enable-module=php4 Jimmy Brake On Tue, 19 Jun 2001, Martin Langlois wrote: I want to make a query from a oracle database with php. That's what I do: $link=Ora_Logon(user,1234); $query = select * from sales; $cursor = ora_do($link,$query); while(ora_fetch($cursor)) { print $cursor; } I have an arror, it's doesn't recongnize ora_logon() function. Do i have to include something special? -- Martin Langlois Programmeur-analyste Inter.net Canada 5252, boul. de Maisonneuve Ouest bureau 200 Montréal,Qc H4A 3S5 http://www.ca.inter.net -- 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] Search in many tables an many fields,
Hello I'm from Argentina, and I'm new on php news, I have a question: How can i search some word or number in all database, like find word Example on all tables, an all fields on each tables, if i cant do automatic I must to do SELECT Fields FROM TABLE1, Table2, TableEtc, Where Field1 = Example or Field2=Example FieldETC=Example What can I do? Thank You very Much -- | Kat0 | | Rest In Peace | -- 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] MSSQL limit capability
Hello Dreamvale, On 20-Jun-01 12:15:14, you wrote: Having used to the wonderful features in MySQL on the limit, how could I do the same on MSSQL? The table I'm trying to retrieve is kinda big - like 500,000 records - and would like to read them in chunks. Use server side cursors. You may want to try Metabase which is a PHP database abstraction package that supports many databases including MS-SQL and among many other things lets you pick the range of rows of a SELECT query results that are retrieved, pretty much like MySQL LIMIT clause but in away that works will all supported databases including MS-SQL. Metabase is freely available here: http://phpclasses.UpperDesign.com/browse.html/package/20 You may also like to try this class that outputs query results in HTML tables eventually with links to go between query result pages. http://phpclasses.UpperDesign.com/browse.html/package/130 Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp -- -- 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] Informix Question how to put data from query into variables
Hi All, What I want to do is create another query from some of the data from another one. The question is how do I take the data I get back from my first query and put that into variables so I can build my second query. The example I have in mind is: I a do a select tracknum,orderdate,ordertotal,status,shipdate from orders where tracknum = '$trknum' and I want the data returned into vars: like orderdate = $orderdate so I can create a new query like: select * from shipping where orderdate = '$orderdate'. HTML !-- doit.php --BODY H1Please enter your Tracking Number: /H1 FORM action=http://sqa/doit.php; INPUT NAME=trknum BR INPUT type = submit value = Execute /FORM /BODY ?php define(DBG,1); $connection = ifx_connect(fra3x@ol_unit,foo,bar) or die(Couldn't create connection.); $sql = select tracknum,orderdate,ordertotal,status,shipdate from orders where tracknum = '$trknum'; $sql_result = ifx_query($sql,$connection); @ifx_htmltbl_result($sql_result,border=1); ifx_free_result($sql_result); ifx_close($connection); ifx_close();} ? -- 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] Too many Connections error
Hi, I'm using PHP to connect to a MySQL server, and occasionally I get the following error: Warning: Too many connections in /usr/sites/www/gamewardens_forum/forumadmin.php on line 243 Unable to connect to Database Server I'm using a persistant connection with the function mysql_pconnect, But the documentation says that if a connection already exists, a new one will not be created. So multiple calls shouldn't be a problem, right? Any thoughts on this? THANKS! -Micah Stevens
RE: [PHP-DB] how to email article to a friend
I would suggest that you send the link to the page that you want them to visit rather then the entire article. The reason being is that you put a lot of work in to getting people to your site to just give them the content, and if you have banners as a revenue source and you send the entire article you will lose those pageviews and click through rates. Just a thought, let me know if you want to do it this way and I will share with you what we have done. Thank You Brian Paulson Sr. Web Developer [EMAIL PROTECTED] The Pueblo Chieftain www.chieftain.com 1-800-279-6397 -Original Message- From: Andreas D. Landmark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 6:22 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] how to email article to a friend At 20.06.2001 08:52, you wrote: You can query your database to extract those info, compose your email and use mail( ) function to send it. that is _not_ a wise way to do it, you should include some form of restrictions on how many emails can be sent to a single account within X minutes for example. Further you should restrict by HTTP_REFERER (yep it's poor, but it's better than nothing) so that a automated script can't use your email-article-to-a-friend function to spam thousands of people without any work... There are quite a few considerations to take into account when writing a email-article-to-a-friend function, just to be on the safe side... -- Andreas D Landmark / noXtension Real Time, adj.: Here and now, as opposed to fake time, which only occurs there and then. -- 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] MSSQL limit capability
MSSQL does not have complete the same functions. You can use SELECT TOP 10. You could also define mssql.batchsize in php.ini. This way php only reads the specified number of rows. You can the use mssql_fetch_batch() to read batches of data on the same query. - Frank Hi, Having used to the wonderful features in MySQL on the limit, how could I do the same on MSSQL? The table I'm trying to retrieve is kinda big - like 500,000 records - and would like to read them in chunks. Thanks. Dreamvale -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] PHP insert into Access autonumber, get inserted value back?
Access should also accept standard SQL commands. If not, you can juggle the data by shooting it from Access to a temp table in MySQL and reading the autonumbered values. If Access will accept your SQL commands (I don't use Access but maybe someone else here can offer better information), then simply issue the appropriate SQL command depending on what you need to do with the new set of values at that point. Also, I believe you can control the value in an autonumbered field in Access so long as there are no duplicates. If this is the case, use the ODBC to select the value in the last row (i.e.. WHERE COUNT = LAST) and add 1 when inserting. Dan - Original Message - From: Ken [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 20, 2001 10:46 AM Subject: [PHP-DB] PHP insert into Access autonumber, get inserted value back? I have an Access database that PHP will be accessing. (I'm assuming I have to do this via ODBC and the Unified ODBC functions in PHP, but correct me if I'm wrong.) The PHP script will be inserting new records into the Access database. The primary key in many of the tables in the Access database is an autonumber field. Thus, the key value will be unknown until after I make the insert call. My question: Either before or after the insert, is there any way for me to find out what the key value is? I know if I were using MySQL, I could call the mysql_insert_id() function to get this information. This is critical to me, because my project entails maintaining a new database (actually, a MySQL database) that contains the same information as an existing Access database. Changes will be made to the new database, which then need to be propagated to the Access database. In order for these databases to remain synchronized, I need the primary keys to be the same in both databases, clearly. Thanks for any suggestions! - Ken [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]