[PHP-DB] [DB_DataObject] why is there no query($query, $params) method?
Hi DB_DataObject uses PEAR::DB internally, which provides a nice query method with two arguments: the SQL statement (with placeholders) and a parameter array, so that I don't have to do any escaping etc. Is there any reason that this method signature is not supported by DB_DataObject? There is a query method, of course, but it takes only one SQL string argument.. Cheers, Thomas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] R6025 Error
Hi all, I'm having a problem with a R6025 error. What happened is that I have a table generated using MySQL and PHP that displays all the registered customers. On the table header, i allow them to click on some links that can sort the table according to their preference. Sometimes, when users click on these sorting links, they get an error: = Microsoft Visual C++ Runtime Library Runtime Error! Program: C:\Program Files\Internet Explorer\IEXPLORE.EXE R6025 - pure virtual function call = when this error appears, the user will have to click OK which closes the browser!! Can someone advice me what i can do?? the links look like that: a href=?=$PHP_SELF;??sort=descsortBy=?=$order;?argmt1=?=$argmt1;?De sc/a a href=?=$PHP_SELF;??sort=ascsortBy=?=$order;?argmt1=?=$argmt1;? Asc/a why should this cause an error??!!! thank you! best regards, hwee hwee -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] R6025 Error
Can you also send us the output generated by PHP? Ie the output HTML... Jos -Original Message- From: Ng Hwee Hwee [mailto:[EMAIL PROTECTED] Sent: 09 May 2005 10:48 To: PHP DB List Subject: [PHP-DB] R6025 Error Hi all, I'm having a problem with a R6025 error. What happened is that I have a table generated using MySQL and PHP that displays all the registered customers. On the table header, i allow them to click on some links that can sort the table according to their preference. Sometimes, when users click on these sorting links, they get an error: = Microsoft Visual C++ Runtime Library Runtime Error! Program: C:\Program Files\Internet Explorer\IEXPLORE.EXE R6025 - pure virtual function call = when this error appears, the user will have to click OK which closes the browser!! Can someone advice me what i can do?? the links look like that: a href=?=$PHP_SELF;??sort=descsortBy=?=$order;?argmt1=?=$argmt1;?De sc/a a href=?=$PHP_SELF;??sort=ascsortBy=?=$order;?argmt1=?=$argmt1;? Asc/a why should this cause an error??!!! thank you! best regards, hwee hwee -- 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] Drop Down Menus
Some body asked for it! -Original Message- From: chintan [mailto:[EMAIL PROTECTED] Sent: Jueves, 05 de Mayo de 2005 07:36 a.m. To: php-db@lists.php.net Subject: [PHP-DB] Drop Down Menus hey guys i wrote this code from another code of zend.php Can anyone tell me how do i update the value of second menu and third one? can i do that without javascript? ?php session_start(); header(Cache-control: private); $link = mysql_connect(localhost, chintan,hellomysql) or die(Could not connect); mysql_select_db(chintan) or die(Could not select database); $XX = No data availabe!; echo form name=HingeType action=$PHP_SELF method=POST; $_SESSION['ItemType'] = $_REQUEST['ItemType']; echo select name=ItemType tabindex=1; $aku = mysql_query(SELECT ItemType FROM Products WHERE ItemName='Hinges' group by ItemType); while ($row = mysql_fetch_array($aku)) { $colom_name=$row[ItemType]; echo option value=$colom_name$colom_name/option; } if ($colom_name=) { print ($XX); } echo /select;? input type=Submit value=Update onclick=Call Test_Click()br ?php echo $_SESSION['ItemType']; $_SESSION['Thickness'] = $_REQUEST['Thickness']; echo select name=Thickness tabindex=2\n; $ak = mysql_query(SELECT Thickness FROM Products WHERE ItemName='Hinges' and ItemType='$_SESSION[ItemType]' group by Thickness); while ($row = mysql_fetch_array($ak)) { $colom_name2=$row[Thickness]; echo option value=$colom_name2$colom_name2/option\n; } if ($colom_name2=) { print ($XX); } echo /select; echo input type=submit value='Update'br; echo $_SESSION['Thickness']; $_SESSION['SizeinMM'] = $_REQUEST['SizeinMM']; echo select name=SizeinMM tabindex=3\n; $ak = mysql_query(SELECT SizeinMM FROM Products WHERE ItemName='Hinges' and ItemType='$_SESSION[ItemType]' and Thickness='$_SESSION[Thickness]'); while ($row = mysql_fetch_array($ak)) { $colom_name3=$row[SizeinMM]; echo option value=$colom_name3$colom_name3/option\n; } if ($colom_name3=) { print ($XX); } echo /select\n; echo input type=submit value='Update'br\n; echo $_SESSION['SizeinMM']; echo /form; $ak = mysql_query(SELECT Rates,Ratesforsspin FROM Products WHERE ItemName='Hinges' and ItemType='$_SESSION[ItemType]' and Thickness='$_SESSION[Thickness]' and SizeinMM='$_SESSION[SizeinMM]'); while ($row = mysql_fetch_array($ak)) { $colom_name4=$row[Rates]; $colom_name5=$row[Ratesforsspin]; } echo brbRates for M.S.Pin:/b\t$colom_name4br; echo bRates for S.S.Pin:/b\t$colom_name5br; ? -- 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] [DB_DataObject] why is there no query($query, $params) method?
On 09/05/05, Thomas [EMAIL PROTECTED] wrote: Is there any reason that this method signature is not supported by DB_DataObject? Perhaps because it doesn't make sense to wrap every DB method when you can already do $dataObject-getDatabaseConnection()-query(...) -- Kieran Tully, Software Developer and Tenor Reply to Kieran.Tully AT acm.org http://kieran.tul.ly http://www.cs.tcd.ie/~tullyka -- Kieran Tully, Software Developer and Tenor Reply to Kieran.Tully AT acm.org http://kieran.tul.ly http://www.cs.tcd.ie/~tullyka -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Can't compile Oracle's 10g support in PHP5
Hi, I'm trying to compile PHP 5.04 with support to Oracle 10g, but i always get the error: checking Oracle version... configure: error: Oracle needed libraries not found Well, i think i have Oracle's libs in /home/oracle/product/10.1.0/db_1/lib/ At least i have a lot of .so there. How can i get overcome this problem ? Any help would be apreciated. My configure folloows my signature. Warm Regards, Mário Gamito ./configure --with-mysql=/usr/local/mysql --with-pgsql=/usr/local/pgsql --with-openssl=/usr/local/ssl --enable-track-vars --with-xml --with-mcrypt --with-gettext --with-ldap --enable-sockets --enable-wddx --enable-xslt --with-xsltsablot --with-zlib --with-kerberos --enable-bcmath --with-bz2 --enable-calendar --with-lpeg-dir --with-tiff-dir --with-curl --with-curlwrappers --with-gdbm --with-expat --with-iconv-dir --with-dom-xslt --with-dom-exslt --with-dom --with-db4 -with-flatfile --with-fam --enable-exif --with-gd --enable-ftp --with-png-dir --with-xpm-dir --with-ttf --with-iconv --with-mhash --with-ncurses --enable-soap --with-readline --with-pear --with-oracle=/home/oracle/product/10.1.0/db_1/lib/ --with-apxs=/usr/local/httpd/bin/apxs --enable-sig-child -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Can't compile Oracle's 10g support in PHP5
Hi, I'm trying to compile PHP 5.04 with support to Oracle 10g, but i always get the error: checking Oracle version... configure: error: Oracle needed libraries not found Well, i think i have Oracle's libs in /home/oracle/product/10.1.0/db_1/lib/ At least i have a lot of .so there. How can i get overcome this problem ? Any help would be apreciated. My configure folloows my signature. Warm Regards, Mário Gamito ./configure --with-mysql=/usr/local/mysql --with-pgsql=/usr/local/pgsql --with-openssl=/usr/local/ssl --enable-track-vars --with-xml --with-mcrypt --with-gettext --with-ldap --enable-sockets --enable-wddx --enable-xslt --with-xsltsablot --with-zlib --with-kerberos --enable-bcmath --with-bz2 --enable-calendar --with-lpeg-dir --with-tiff-dir --with-curl --with-curlwrappers --with-gdbm --with-expat --with-iconv-dir --with-dom-xslt --with-dom-exslt --with-dom --with-db4 -with-flatfile --with-fam --enable-exif --with-gd --enable-ftp --with-png-dir --with-xpm-dir --with-ttf --with-iconv --with-mhash --with-ncurses --enable-soap --with-readline --with-pear --with-oracle=/home/oracle/product/10.1.0/db_1/lib/ --with-apxs=/usr/local/httpd/bin/apxs --enable-sig-child -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] [DB_DataObject] why is there no query($query, $params) method?
Sorry, but doesn't make sense to me, since there is nothing parsing the result then. If you have a look at the _query() method, it does the essential parsing of the sql result, raising errors etc. I don't want to bypass the DataObject framework at this point. T Kieran.Tully AT acm.org wrote: On 09/05/05, Thomas [EMAIL PROTECTED] wrote: Is there any reason that this method signature is not supported by DB_DataObject? Perhaps because it doesn't make sense to wrap every DB method when you can already do $dataObject-getDatabaseConnection()-query(...) -- Kieran Tully, Software Developer and Tenor Reply to Kieran.Tully AT acm.org http://kieran.tul.ly http://www.cs.tcd.ie/~tullyka -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Having a DUH Moment with mysql_fetch_array
Ok, I'm a PHP newbie and I'm having a problem. All I want to do is parse some information out of a database and send someone and email stating that their posting has been approved. I've verified that my SQL is indeed returning the correct value for $key, but when I go to fetch the array for the row so that I can extract the pertinent tidbits of information from that row, I get nada. My troubleshooting echo statements give me the following out put. I've included the actual snippet of code below. 54 SELECT * FROM jobs WHERE pk_job = '54' Resource id #4 Array 0 //use the date to find the record we're looking for approved but not yet posted $findkey = SELECT pk_job from jobs WHERE (display = 'Yes') AND (approval_stamp = '$matchnow') AND (posted IS NULL); list($getkey) = mysql_fetch_row(mysql_query ($findkey)); $key = ($getkey); echo $key; //note this is returning the correct and expected value echo br; // now that we have the key lets get the row $query = SELECT * FROM jobs WHERE pk_job = '$key'; echo $query; //note this is apparently behaving correctly and gives me a correct result when executed from the command line echo br; $result = mysql_query($query); echo $result; echo br; //make array $row = mysql_fetch_array ($result); echo $row; I'm pretty sure that this is a DUH! moment, but I'm not sure quite what it is that I've done. I copied the code from another thing that I wrote a while back that's working fine and only changed SQL statements to reflect their new purpose in life. TIA, Jimi If computers get too powerful, we can organize them into a committee -- that will do them in. -- Bradley's Bromide
Re: [PHP-DB] R6025 Error
hi, thanks for your reply... an example of the generated HTML code is as follows: a href=odr_top.php?sort=descsortBy=T010SeqNoargmt1=argmt2=DESC/a a href=odr_top.php?sort=ascsortBy=T010SeqNoargmt1=argmt2= ASC/a i tried googling for this error but they keep telling me about some Microsoft coding errors that i don't understand. I do not code in C or C++ so why should it cause a problem in my codes? thank you for your help!! best regards, hwee - Original Message - From: Juffermans, Jos [EMAIL PROTECTED] To: PHP DB List php-db@lists.php.net Sent: Monday, May 09, 2005 6:01 PM Subject: RE: [PHP-DB] R6025 Error Can you also send us the output generated by PHP? Ie the output HTML... Jos -Original Message- From: Ng Hwee Hwee [mailto:[EMAIL PROTECTED] Sent: 09 May 2005 10:48 To: PHP DB List Subject: [PHP-DB] R6025 Error Hi all, I'm having a problem with a R6025 error. What happened is that I have a table generated using MySQL and PHP that displays all the registered customers. On the table header, i allow them to click on some links that can sort the table according to their preference. Sometimes, when users click on these sorting links, they get an error: = Microsoft Visual C++ Runtime Library Runtime Error! Program: C:\Program Files\Internet Explorer\IEXPLORE.EXE R6025 - pure virtual function call = when this error appears, the user will have to click OK which closes the browser!! Can someone advice me what i can do?? the links look like that: a href=?=$PHP_SELF;??sort=descsortBy=?=$order;?argmt1=?=$argmt1;?De sc/a a href=?=$PHP_SELF;??sort=ascsortBy=?=$order;?argmt1=?=$argmt1;? Asc/a why should this cause an error??!!! thank you! best regards, hwee hwee -- 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] Having a DUH Moment with mysql_fetch_array
Hi Jim, echo cannot display the content of an array or object. try print_r() or var_dump() - Frank Ok, I'm a PHP newbie and I'm having a problem. All I want to do is parse some information out of a database and send someone and email stating that their posting has been approved. I've verified that my SQL is indeed returning the correct value for $key, but when I go to fetch the array for the row so that I can extract the pertinent tidbits of information from that row, I get nada. My troubleshooting echo statements give me the following out put. I've included the actual snippet of code below. 54 SELECT * FROM jobs WHERE pk_job = '54' Resource id #4 Array 0 //use the date to find the record we're looking for approved but not yet posted $findkey = SELECT pk_job from jobs WHERE (display = 'Yes') AND (approval_stamp = '$matchnow') AND (posted IS NULL); list($getkey) = mysql_fetch_row(mysql_query ($findkey)); $key = ($getkey); echo $key; //note this is returning the correct and expected value echo br; // now that we have the key lets get the row $query = SELECT * FROM jobs WHERE pk_job = '$key'; echo $query; //note this is apparently behaving correctly and gives me a correct result when executed from the command line echo br; $result = mysql_query($query); echo $result; echo br; //make array $row = mysql_fetch_array ($result); echo $row; I'm pretty sure that this is a DUH! moment, but I'm not sure quite what it is that I've done. I copied the code from another thing that I wrote a while back that's working fine and only changed SQL statements to reflect their new purpose in life. TIA, Jimi If computers get too powerful, we can organize them into a committee -- that will do them in. -- Bradley's Bromide -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Having a DUH Moment with mysql_fetch_array
Thompson, Jimi wrote: Ok, I'm a PHP newbie and I'm having a problem. All I want to do is parse some information out of a database and send someone and email stating that their posting has been approved. I've verified that my SQL is indeed returning the correct value for $key, but when I go to fetch the array for the row so that I can extract the pertinent tidbits of information from that row, I get nada. My troubleshooting echo statements give me the following out put. I've included the actual snippet of code below. 54 SELECT * FROM jobs WHERE pk_job = '54' Resource id #4 Array 0 //use the date to find the record we're looking for approved but not yet posted $findkey = SELECT pk_job from jobs WHERE (display = 'Yes') AND (approval_stamp = '$matchnow') AND (posted IS NULL); list($getkey) = mysql_fetch_row(mysql_query ($findkey)); $key = ($getkey); echo $key; //note this is returning the correct and expected value echo br; // now that we have the key lets get the row $query = SELECT * FROM jobs WHERE pk_job = '$key'; echo $query; //note this is apparently behaving correctly and gives me a correct result when executed from the command line echo br; $result = mysql_query($query); echo $result; echo br; //make array $row = mysql_fetch_array ($result); echo $row; $row is an array that contains data on the first row from the query result. so echo $row['columnname']; to show a column. I'm pretty sure that this is a DUH! moment, but I'm not sure quite what it is that I've done. I copied the code from another thing that I wrote a while back that's working fine and only changed SQL statements to reflect their new purpose in life. TIA, Jimi If computers get too powerful, we can organize them into a committee -- that will do them in. -- Bradley's Bromide -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php