[PHP-DB] Calling DB2's stored Procedures from PHP
is it possible to call stored procedures on an DB2 Database (assuming you have the DB2-Support up running)? -- Gre aus dem schnen Kleve Jens Kisters rosomm et partner Agentur fr neue Medien GmbH Dienstleistungszentrum am Weien Tor - Eingang B Gocher Landstrasse 2 47551 Kleve / Bedburg-Hau Telefon: 02821 - 97856-20 Telefax: 02821 - 97856-77 [EMAIL PROTECTED] http://www.rosomm-partner.de -- 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] Transmitting Arrays
Mark I've had similar problems in the past. It's my understanding that you can't pass arrays between scripts, except when using sessions. They seem to transfer in, for example: include("script.php"); require("script.php"); but not in: a href='script.php?var=$var'Pass/a but I would love to be corrected on this by a PHP expert! Regards Mick Lloyd [EMAIL PROTECTED] Tel: +44 (0)1684 560224 - Original Message - From: Mark Collin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 20, 2001 9:44 PM Subject: [PHP-DB] Transmitting Arrays I have a form which dynamically builds a table by taking data out of a mysql database http://www.fyrespray.net/screenshots/admin/modifyscreenshot.php4?pageid=1 but i'm having problems whn i try to modify the data i'm trying to put all the data into arrays serialize it, urlencode it then send it on to the next page to put it into database and then send back to the original page when its done, i'm having a problem actually sendig my arrays around though, the second page doesn't seem to get any data after i have unserialized it and urlunecoded it. anyone have any ideas, i've been fiddleing about a load with the code and there is a good chance i have totally messed it up now heres the state its in atm though if you would like to look http://www.fyrespray.net/screenshots/admin/modifyscreenshot.txt http://www.fyrespray.net/screenshots/admin/modify.txt (prolly need to save the first page if your browser is picking up the html bits and making half of a web page up like mine does) -- 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] Transmitting Arrays
I don't think that serialize/unserialize was meant to be used that way. I would try WDDX which is specifically designed for the web. -Stathis. Mick Lloyd wrote: Mark I've had similar problems in the past. It's my understanding that you can't pass arrays between scripts, except when using sessions. They seem to transfer in, for example: include("script.php"); require("script.php"); but not in: a href='script.php?var=$var'Pass/a but I would love to be corrected on this by a PHP expert! Regards Mick Lloyd [EMAIL PROTECTED] Tel: +44 (0)1684 560224 - Original Message - From: Mark Collin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 20, 2001 9:44 PM Subject: [PHP-DB] Transmitting Arrays I have a form which dynamically builds a table by taking data out of a mysql database http://www.fyrespray.net/screenshots/admin/modifyscreenshot.php4?pageid=1 but i'm having problems whn i try to modify the data i'm trying to put all the data into arrays serialize it, urlencode it then send it on to the next page to put it into database and then send back to the original page when its done, i'm having a problem actually sendig my arrays around though, the second page doesn't seem to get any data after i have unserialized it and urlunecoded it. anyone have any ideas, i've been fiddleing about a load with the code and there is a good chance i have totally messed it up now heres the state its in atm though if you would like to look http://www.fyrespray.net/screenshots/admin/modifyscreenshot.txt http://www.fyrespray.net/screenshots/admin/modify.txt (prolly need to save the first page if your browser is picking up the html bits and making half of a web page up like mine does) -- 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] Sessions and MySQL
Hello Rob, Tuesday, 20 March 2001, you wrote: RW I am trying to implement session support with mysql. I am using RW session.set_save_handler but don't really have a great set of functions does RW anyone have some good ones? Try http://www.phpbuilder.com/columns/ying2602.php3 Mark -- 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, ADO/ODBC and MS Access 97 Queries
1. In ODBC Data Source Administrator create System DSN to your DB 2. In PHP use $x=odbc_connect("your system DSN","",""); $r=odbc_exec($x,"select * from some_table"); echo(odbc_result($r,1)); http://www.zend.com/manual Best regards Denis Eltsov ""Christie, Darren"" [EMAIL PROTECTED] wrote in message D2AB23F62306D311B99500A0C9AC1AA401782622@ANITE127">news:D2AB23F62306D311B99500A0C9AC1AA401782622@ANITE127... Can anyone give me any pointers on how I can execute queries in MS Access97 from PHP and get the results back using either ADO or ODBC? Thanks in advance Darren -- 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, ADO/ODBC and MS Access 97 Queries
Hello Darren, Monday, 19 March 2001, you wrote: CD Can anyone give me any pointers on how I can execute queries in MS Access97 CD from PHP and get the results back using either ADO or ODBC? CD Thanks in advance CD Darren Try http://www.phpbuilder.com/columns/siddarth2228.php3 Mark -- 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] Yet more strings
Hi, I'm not quite sure but try to play a bit with the '".$row[...]."' part. that looks too much. leave out the "" and/or the period. good luck Johannes ""Mick Lloyd"" [EMAIL PROTECTED] schrieb im Newsbeitrag 00c001c0b1ea$54a5f5c0$5c0083ca@oemcomputer">news:00c001c0b1ea$54a5f5c0$5c0083ca@oemcomputer... CC's suggestion of using mysql_num_rows helped to clarify the problem rather than find a solution! The problem is with mysql not PHP. When I use: $resultp = mysql_query("select Primaryid from primarycodes where Code = '".$row[Primaryexpertise]."'") or die (mysql_error()); it doesn't return a resource id#, ie the query fails. mysql_num_rows returns 0. Using: $resultp = mysql_query("select Primaryid from primarycodes where Code LIKE '%$row[Primaryexpertise]%'") or die (mysql_error()); it works, mysql_num_rows returns 1. I have also checked the string length of $row[Primaryexpertise] (the value of which is Biology for example) and it shows that there are no "hidden" characters in the field value (ie strlen returns 7). Running all this at the mysql shell (is that the word?) results in the same errors. The row values are Primaryid (8) and Code (Biology). mysqlselect Primaryid,Code from primarycodes where Code like '%Biology%'; \\returns the correct values mysqlselect Primaryid,Code from primarycodes where Primaryid = 8; \\returns the correct values mysqlselect Primaryid,Code from primarycodes where Code = 'Biology'; \\returns Empty set I'm no expert (obviously) but something seems odd here. Regards Mick Lloyd [EMAIL PROTECTED] Tel: +44 (0)1684 560224 -- 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] Yet more strings
When I have exact string matches fail where I don't expect them, and using a LIKE fixes it, the very first thing I check for is embedded whitespace in the data. "foo " and "foo" and " foo " are not the same. If this is the case then IMHO the best solution is to fix the data in the database, but barring that you can probably use the TRIM() function in your where clause. (note: the MySQL docs show using trim in the output, not in the where clause so I won't swear that its possible, but it should be) Regards, Gary ""Mick Lloyd"" [EMAIL PROTECTED] wrote in message 00c001c0b1ea$54a5f5c0$5c0083ca@oemcomputer">news:00c001c0b1ea$54a5f5c0$5c0083ca@oemcomputer... CC's suggestion of using mysql_num_rows helped to clarify the problem rather than find a solution! The problem is with mysql not PHP. When I use: $resultp = mysql_query("select Primaryid from primarycodes where Code = '".$row[Primaryexpertise]."'") or die (mysql_error()); it doesn't return a resource id#, ie the query fails. mysql_num_rows returns 0. Using: $resultp = mysql_query("select Primaryid from primarycodes where Code LIKE '%$row[Primaryexpertise]%'") or die (mysql_error()); it works, mysql_num_rows returns 1. I have also checked the string length of $row[Primaryexpertise] (the value of which is Biology for example) and it shows that there are no "hidden" characters in the field value (ie strlen returns 7). Running all this at the mysql shell (is that the word?) results in the same errors. The row values are Primaryid (8) and Code (Biology). mysqlselect Primaryid,Code from primarycodes where Code like '%Biology%'; \\returns the correct values mysqlselect Primaryid,Code from primarycodes where Primaryid = 8; \\returns the correct values mysqlselect Primaryid,Code from primarycodes where Code = 'Biology'; \\returns Empty set I'm no expert (obviously) but something seems odd here. Regards Mick Lloyd [EMAIL PROTECTED] Tel: +44 (0)1684 560224 -- 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] Yet more strings
i've had similar problems with mysql. postgres seems happy with having quotes around data pulled back as associative arrays like $data = $result["userid"]; and from using mysql it sometimes likes it that way and sometimes without. the syntax for the string is right as long as the string follows the same conventions throughout. like: $query ="select date from date-table where date like '".$date."'"; if primaryexpertise is text does it need the extra ' ? i think this may be clodser to the truth as %primaryexpertise% would return a hit if there were extra chars at the front and end of primaryexpertise Steve -Original Message- From: Johannes Janson [mailto:[EMAIL PROTECTED]] Sent: 21 March 2001 12:00 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Yet more strings Hi, I'm not quite sure but try to play a bit with the '".$row[...]."' part. that looks too much. leave out the "" and/or the period. good luck Johannes ""Mick Lloyd"" [EMAIL PROTECTED] schrieb im Newsbeitrag 00c001c0b1ea$54a5f5c0$5c0083ca@oemcomputer">news:00c001c0b1ea$54a5f5c0$5c0083ca@oemcomputer... CC's suggestion of using mysql_num_rows helped to clarify the problem rather than find a solution! The problem is with mysql not PHP. When I use: $resultp = mysql_query("select Primaryid from primarycodes where Code = '".$row[Primaryexpertise]."'") or die (mysql_error()); it doesn't return a resource id#, ie the query fails. mysql_num_rows returns 0. Using: $resultp = mysql_query("select Primaryid from primarycodes where Code LIKE '%$row[Primaryexpertise]%'") or die (mysql_error()); it works, mysql_num_rows returns 1. I have also checked the string length of $row[Primaryexpertise] (the value of which is Biology for example) and it shows that there are no "hidden" characters in the field value (ie strlen returns 7). Running all this at the mysql shell (is that the word?) results in the same errors. The row values are Primaryid (8) and Code (Biology). mysqlselect Primaryid,Code from primarycodes where Code like '%Biology%'; \\returns the correct values mysqlselect Primaryid,Code from primarycodes where Primaryid = 8; \\returns the correct values mysqlselect Primaryid,Code from primarycodes where Code = 'Biology'; \\returns Empty set I'm no expert (obviously) but something seems odd here. Regards Mick Lloyd [EMAIL PROTECTED] Tel: +44 (0)1684 560224 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Transmitting Arrays
hmm... looks like you're trying to use seralize(var_name); with out assigning a value to a holder variable. $holder=seralize($var_name); will probably get you further along. also, try: $var_name=unseralize($holder); for the return trip. same goes for urlencode/decode; though you can do two steps in one. $holder=urlencode(seralize($var_name)); $var_name=unseralize(urldecode($holder)); Might also want to use htmlentities(): echo "a href=next.html?holder=".htmlentities($holder)."next/a"; gl, -Joe ""Mark Collin"" [EMAIL PROTECTED] wrote in message 01f501c0b186$f82da990$4134fea9@effigia">news:01f501c0b186$f82da990$4134fea9@effigia... I have a form which dynamically builds a table by taking data out of a mysql database http://www.fyrespray.net/screenshots/admin/modifyscreenshot.php4?pageid=1 but i'm having problems whn i try to modify the data i'm trying to put all the data into arrays serialize it, urlencode it then send it on to the next page to put it into database and then send back to the original page when its done, i'm having a problem actually sendig my arrays around though, the second page doesn't seem to get any data after i have unserialized it and urlunecoded it. anyone have any ideas, i've been fiddleing about a load with the code and there is a good chance i have totally messed it up now heres the state its in atm though if you would like to look http://www.fyrespray.net/screenshots/admin/modifyscreenshot.txt http://www.fyrespray.net/screenshots/admin/modify.txt (prolly need to save the first page if your browser is picking up the html bits and making half of a web page up like mine does) -- 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] dbm support broken? Please help!
I'm trying to build php 4.0.4pl1 with dbm support on my RedHat Linux 6.2 box. I need it to be able to work with apache 1.3.14 mod_auth_dbm. Each time I run: ./configure \ --with-zlib=shared \ --with-xml=shared \ --with-gd=shared \ --with-interbase=shared \ --with-db \ --enable-dba=shared \ --with-dbm \ --with-gdbm \ --with-ndbm \ --with-db2 \ --with-imap=shared \ --with-openssl=/usr \ --with-config-file-path=/etc/httpd/conf \ --enable-versioning \ --with-apxs=/usr/sbin/apxs \ --enable-memory-limit \ --enable-trans-sid \ --enable-sysvsem \ --enable-sysvshm \ --enable-gd-imgstrttf \ --enable-track-vars I get the following error: configure: error: cannot find necessary header file(s) If I remove the line "--with-dbm" everything works fine. What should I do or what should I need to build dbm support into php? I need "dbm", since looks like other formats are not compatible with mod_auth_dbm (and ... Yes, dbmmanage works fine). Thanks P.S. I've also tried with php-4.0.5RC1 but the result was still the same. -- 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] CodeCharge IDE (OT)
I accidentally entered php.org instead of php.net the other day when I was looking for the php man pages and came across the CodeCharge IDE...I know no tool can foresee all possible situations and therefore cannot be a panacea (or even useful), but I was wondering if there are any users of this tool out there, and what value do they find in it... Thanks Luis __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.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]
Re: [PHP-DB] Yet more strings
Gary Thanks for the advice. I had checked the string length to make sure there were no "hidden" spaces (which there aren't in the specific field I am selecting) and have now tried trim() but to no avail. Still fiddling with it! Regards Mick Lloyd [EMAIL PROTECTED] Tel: +44 (0)1684 560224 - Original Message - From: Gary Huntress [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 21, 2001 12:45 PM Subject: Re: [PHP-DB] Yet more strings When I have exact string matches fail where I don't expect them, and using a LIKE fixes it, the very first thing I check for is embedded whitespace in the data. "foo " and "foo" and " foo " are not the same. If this is the case then IMHO the best solution is to fix the data in the database, but barring that you can probably use the TRIM() function in your where clause. (note: the MySQL docs show using trim in the output, not in the where clause so I won't swear that its possible, but it should be) Regards, Gary ""Mick Lloyd"" [EMAIL PROTECTED] wrote in message 00c001c0b1ea$54a5f5c0$5c0083ca@oemcomputer">news:00c001c0b1ea$54a5f5c0$5c0083ca@oemcomputer... CC's suggestion of using mysql_num_rows helped to clarify the problem rather than find a solution! The problem is with mysql not PHP. When I use: $resultp = mysql_query("select Primaryid from primarycodes where Code = '".$row[Primaryexpertise]."'") or die (mysql_error()); it doesn't return a resource id#, ie the query fails. mysql_num_rows returns 0. Using: $resultp = mysql_query("select Primaryid from primarycodes where Code LIKE '%$row[Primaryexpertise]%'") or die (mysql_error()); it works, mysql_num_rows returns 1. I have also checked the string length of $row[Primaryexpertise] (the value of which is Biology for example) and it shows that there are no "hidden" characters in the field value (ie strlen returns 7). Running all this at the mysql shell (is that the word?) results in the same errors. The row values are Primaryid (8) and Code (Biology). mysqlselect Primaryid,Code from primarycodes where Code like '%Biology%'; \\returns the correct values mysqlselect Primaryid,Code from primarycodes where Primaryid = 8; \\returns the correct values mysqlselect Primaryid,Code from primarycodes where Code = 'Biology'; \\returns Empty set I'm no expert (obviously) but something seems odd here. Regards Mick Lloyd [EMAIL PROTECTED] Tel: +44 (0)1684 560224 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Select where date is in period
The database has a table of equipments with date fields for date_online and date_offline. The requirement is to find which equipments were available on a date specified by the user, this being a variable created by the user. My attempts at scripting for the condition where the date_online = 'specified variable' and the date_offline = 'specified variable' totally fail for syntax says mySQL (and possibly for method) I would be grateful for help or a pointer to a reference. Tim Morris -- 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] SSI
Is it possible to have SSIs in PHP ?? I want to do something like !--#include virtual="side-nav.php3" -- 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 Include
if you include() some php in another script, then variables which exist in the file including the other will be inherited exactly the same as if you had copy-pasted the code, rather than "including" it At 03:22 PM 3/22/01 +0800, Shahmat Dahlan wrote: If I were to break my codes into pieces and put them into seperate files and call them from a single "depository" php script, how do I pass variables from one file to another? Thanks in advance. Shahmat -- 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] -- Beau Lebens - Web Master Insurance My Way, Your Friendly Online Broker (08) 9226 5888 http://www.insurancemyway.com.au/ -- 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]