[PHP-DB] Re: How to Make a Pop Up Window and show there a mysql table?
I use this: function CopyValue(ChangeWhat,ValueToCopy,aForm) { changer = window.opener.document.+ aForm + . + ChangeWhat + .value=' + ValueToCopy.toUpperCase() + '; eval(changer); submitme = window.opener.document. + aForm + .submit(); eval(submitme); window.close(); } Important is the first 2 lines, about the 'changer'. The other line will automatically submit the form. I think you don't want this. In the help window (with your list of codes and descriptions), put this in each option: a href=javascript:CopyValue('ChangeWhat','Value','FormName') Code description /a where: ChangeWhat is the name of the field in the form Value is what you want to put there FormName is the name of the form For an example, see my website http://www.cyclades-info.com. Press the question mark in the search form. If you need more help, mail me. Regards, Edwin José Luis wrote: I need know if 's possible show a mysql table like when you are entering some code product, you press an icon with ? (by example) and there appear the window showing the table with the code and the description and the you choose and pick some item from that table and the code pass to the input field, I saw this on asp but I think there it's possible create some on php with javascript, I am not sure what is the name of this technic. Thanks Regards José Luis Palacios Vergara -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Array Issue help please
Hi All I have nearly got this working but it dose not seem to loop though or return the result I have done something wrong and I ask one of you coders that are much cleverer that I to glance over my code to see the obvious mistake / s. Thank you in advance for any help Dave Carrera // Start of my code if(isset($_POST[domain])){ $uswhois = whois.networksolutions.com; $ukwhois = whois.nic.uk; $arr = array(.co.uk,.org.uk,.plc.uk,.ltd.uk,.me.uk,.com,.net,.or g); echo Top Level Domains: br /br /; $domname = $_POST[domain]; while(list(,$tld)=each($arr)) { if(($tld == .com) || ($tld == .net) || ($tld == .org)){ $whois = $uswhois; $linenumber = 8; } else { $whois = $ukwhois; $linenumber = 2; } $stld = $domname$tld to $whois using line $linenumberbr /; echo $stld; for($i=0;$i=count($arr);$i++){ $fp = fsockopen ($whois, 43, $errno, $errstr, 30) or die($errno: $errstr); fputs($fp, $domname$tld\n); while (!feof($fp)) { $serverReturn = fgets($fp, 2048); $x++; if ($x == $lineNumber) { $line = $serverReturn; } } fclose($fp); $token = strtok($line, ); if ($token == 'No') { $result = 0; } else { $result = 1; } return $result; } $answer = $result; if(isset($answer)) { $checkeddom .= img src=\./img/x.jpg\ border=\0\nbsp;font color=red$_POST[domain]$tld/fontbr /; } else { $checkeddom .= img src=\./img/tick.jpg\ border=\0\nbsp;font color=green$_POST[domain]$tld/b/fontbr /; } } } //End of my code --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 10/01/2003
Re: [PHP-DB] Array Issue help please
On Monday 20 January 2003 17:50, Dave Carrera wrote: I have nearly got this working but it dose not seem to loop though or return the result I have done something wrong and I ask one of you coders that are much cleverer that I to glance over my code to see the obvious mistake / s. Can you describe in more detail how your code doesn't behave the way you expected it to behave? So do you see anything at all? What exactly does it do? Error messages? Have you checked the logs? Have you tried echo() on the important variables to see what they contain? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* The last time I saw him he was walking down Lover's Lane holding his own hand. -- Fred Allen */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] php - excel
In case you are on a windows machine : http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1820 berber -Original Message- From: David Rice [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 19, 2003 5:14 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] php - excel Just a question, is it possible to dynamically create an excel spreadsheet from data in a mysql database the excel sheet does not have to be displayed, just to be sent to print, to give better print quality than a webpage tables equivalent. Or is there another way of doing this? _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus -- 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] ghost parse error?
hello, if you could check this code that would be awesome. i am getting a parse error on line 16 but line 16 has nothing on it and my eyes are missing something... maybe my mind. anyway... thank you again. best, addison ? session_start(); if (@$auth != yes) { header(Location: login.php); exit(); } include(config.php); $sql = SELECT first_name,last_name FROM accounts WHERE email='$logname'; $result = mysql_query($sql) or die(Couldn't execute query 1.); $row = mysql_fetch_array($result,MYSQL_ASSOC); extract($row); ? ? $cobj = mysql_db_query($dbname,select * from category where id=$category); $crow = mysql_fetch_object($cobj); ? ? $scobj = mysql_db_query($dbname,select * from subcategory where id=$subcategory); while ($scrow = mysql_fetch_object($scobj); ? ? echo headtitleDirecting/title/head h2 align='center' style='margin-top: .7in' $first_name $last_name/h2\n; ? p align=centerbr bfont color=#CC9933 size=2 face=Arial, Helvetica, sans-serif ? echo $crow-name;? font size=3gt;/font ? echo $scrow-name;? /font/b font color=#3399FF size=3 face=Arial, Helvetica, sans-serif Directing . . ./font/p form method=post action= /form -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 [EMAIL PROTECTED] [EMAIL PROTECTED] subsidiaries of small independent publishing co. [EMAIL PROTECTED] [EMAIL PROTECTED]
[PHP-DB] getting client browser info
Hello all, I need a quick script to get the client's browser make and model. ie 5 ns 4.7 etc. I've found some info in two books but no examples of how to use it to get your visitors info. Not coming up with anything helpful on the php site - will continue to look. If anyone has done this and/or has an example I would be greatful Thx Mignon -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: header?
there is a lot ways to do it,this is one and not the best of them create link in the particular category file: a href=subcat.php?category=1subcat=1subcat 1/a a href=subcat.php?category=1subcat=2subcat 2/a then in subcat.php: include(subcat.$category.$subcat..php); when you click the 2nd link above it goes to subcat.php that includes subcat12.php subcat12.php is the subcategory file according to category1,subcategory2 Addison Ellis writes: hello, i have a page where the user selects a category. they are directed to a page that takes them to subactegory and displays the subcategory according to category id. my question is can i from there direct them to a particular page from a list of a number of different pages according to their subcategory choice? my thought was to direct them to one page that contains all the relations between category and subcategory and if subcategory=id where category=$category then include or header example.php. i wasn't even sure about that. anyway... thank you for your time and thoughts. best, addison -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 [EMAIL PROTECTED] [EMAIL PROTECTED] subsidiaries of small independent publishing co. [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- STOP doing things that can be done with yr computer! -- $BS -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] getting client browser info
Well, it is a global variable/defined by PHP write a script like this: ?php phpinfo(); ? and run it. This shoudl shed some light on the situation... -Brad Hello all, I need a quick script to get the client's browser make and model. ie 5 ns 4.7 etc. I've found some info in two books but no examples of how to use it to get your visitors info. Not coming up with anything helpful on the php site - will continue to look. If anyone has done this and/or has an example I would be greatful Thx Mignon -- 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] ghost parse error?
Could you please identify which line of code is line 16? -Original Message- From: zmn [mailto:[EMAIL PROTECTED]] Sent: Monday, January 20, 2003 10:16 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] ghost parse error? Why in the first place do you break you php and start it over again? I mean the ? and the ? you might just as well keep it going. Please try to get the code in one long row :) zmn -Oorspronkelijk bericht- Van: Addison Ellis [mailto:[EMAIL PROTECTED]] Verzonden: maandag 20 januari 2003 15:43 Aan: [EMAIL PROTECTED] Onderwerp: [PHP-DB] ghost parse error? hello, if you could check this code that would be awesome. i am getting a parse error on line 16 but line 16 has nothing on it and my eyes are missing something... maybe my mind. anyway... thank you again. best, addison ? session_start(); if (@$auth != yes) { header(Location: login.php); exit(); } include(config.php); $sql = SELECT first_name,last_name FROM accounts WHERE email='$logname'; $result = mysql_query($sql) or die(Couldn't execute query 1.); $row = mysql_fetch_array($result,MYSQL_ASSOC); extract($row); ? ? $cobj = mysql_db_query($dbname,select * from category where id=$category); $crow = mysql_fetch_object($cobj); ? ? $scobj = mysql_db_query($dbname,select * from subcategory where id=$subcategory); while ($scrow = mysql_fetch_object($scobj); ? ? echo headtitleDirecting/title/head h2 align='center' style='margin-top: .7in' $first_name $last_name/h2\n; ? p align=centerbr bfont color=#CC9933 size=2 face=Arial, Helvetica, sans-serif ? echo $crow-name;? font size=3gt;/font ? echo $scrow-name;? /font/b font color=#3399FF size=3 face=Arial, Helvetica, sans-serif Directing . . ./font/p form method=post action= /form -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 [EMAIL PROTECTED] [EMAIL PROTECTED] subsidiaries of small independent publishing co. [EMAIL PROTECTED] [EMAIL PROTECTED] -- 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] getting client browser info
Use this to get the array in which you can find the var you need: ?php print pre; print_r($_SERVER); print /pre; ? So this is the var you're looking for: $_SERVER[HTTP_USER_AGENT]; -Oorspronkelijk bericht- Van: Mignon Hunter [mailto:[EMAIL PROTECTED]] Verzonden: maandag 20 januari 2003 16:05 Aan: [EMAIL PROTECTED] Onderwerp: [PHP-DB] getting client browser info Hello all, I need a quick script to get the client's browser make and model. ie 5 ns 4.7 etc. I've found some info in two books but no examples of how to use it to get your visitors info. Not coming up with anything helpful on the php site - will continue to look. If anyone has done this and/or has an example I would be greatful Thx Mignon -- 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] Problem in the returnvalue of a function
Hi, I have a problem in the response of a php-function. Here the query on the mysql-prompt. mysql select * from product_price where product_id=7 and from_price =5; +--++---++--+--- ---+-+-+---+---+ --+ | product_price_id | product_id | product_price | from_price | to_price | product_currency | product_price_vdate | product_price_edate | cdate | mdate | shopper_group_id | +--++---++--+--- ---+-+-+---+---+ --+ |7 | 7 |149.99 | 0 | NULL | USD | 0 | 0 | 950321754 | 966506270 |5 | | 16 | 7 | 2.99 | 1 |2 | USD | 0 | 0 | 966589140 | 966589140 |6 | | 17 | 7 | 1.99 | 3 |5 | USD | 0 | 0 | 966589140 | 966589140 |6 | +--++---++--+--- ---+-+-+---+---+ --+ 3 rows in set (0.00 sec) And here is the function I have written in php /* ** name: select_price() ** created by: ** description: ** parameters: ** returns: **/ function select_price($product_id,$quantity) { echo Product-ID ; echo $product_id; echoQuantity ; echo $quantity; echo; $db = new ps_DB; $q = SELECT * FROM product_price ; $q .= WHERE product_id= . $product_id . AND from_price = . $quantity . ; $q .= AND to_price = . $quantity . ; $db-query($q); echo \n; echo $q; echo \n; return True; } This is the line for calling the function (in the code one line): $price=$ps_product_price-select_price($cart[$i][product_id],$cart[$i][quanti ty]); //printf(%.2f, $price[product_price]); printf(%.2f,$price); I don't understand why the function ever returns the price 1.00 by different quantities. Regards, Ruprecht -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: ghost parse error?
actually your script shows like a mess in my mail, so i don't know where line 16 is,but i looking for the error by eliminating lines that i considered it's right while ($scrow = mysql_fetch_object($scobj); and i think may be your problem is here! -- STOP doing things that the computer can does! -- $BS -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Problem in the returnvalue of a function
Your last line in the function returns True, which is 1 internally. This makes the function return 1 always. Philip -Original Message- From: rhelms@linux [mailto:rhelms@linux]On Behalf Of Ruprecht Helms Sent: Monday, January 20, 2003 3:37 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Problem in the returnvalue of a function Hi, I have a problem in the response of a php-function. Here the query on the mysql-prompt. mysql select * from product_price where product_id=7 and from_price =5; +--++---++--+--- ---+-+-+---+---+ --+ | product_price_id | product_id | product_price | from_price | to_price | product_currency | product_price_vdate | product_price_edate | cdate | mdate | shopper_group_id | +--++---++--+--- ---+-+-+---+---+ --+ |7 | 7 |149.99 | 0 | NULL | USD | 0 | 0 | 950321754 | 966506270 |5 | | 16 | 7 | 2.99 | 1 |2 | USD | 0 | 0 | 966589140 | 966589140 |6 | | 17 | 7 | 1.99 | 3 |5 | USD | 0 | 0 | 966589140 | 966589140 |6 | +--++---++--+--- ---+-+-+---+---+ --+ 3 rows in set (0.00 sec) And here is the function I have written in php /* ** name: select_price() ** created by: ** description: ** parameters: ** returns: **/ function select_price($product_id,$quantity) { echo Product-ID ; echo $product_id; echoQuantity ; echo $quantity; echo; $db = new ps_DB; $q = SELECT * FROM product_price ; $q .= WHERE product_id= . $product_id . AND from_price = . $quantity . ; $q .= AND to_price = . $quantity . ; $db-query($q); echo \n; echo $q; echo \n; return True; } This is the line for calling the function (in the code one line): $price=$ps_product_price-select_price($cart[$i][product_id],$cart[$i][quanti ty]); //printf(%.2f, $price[product_price]); printf(%.2f,$price); I don't understand why the function ever returns the price 1.00 by different quantities. Regards, Ruprecht -- 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] Re: Problem in the returnvalue of a function
Ruprecht Helms writes: function select_price($product_id,$quantity) { --cut-- return True; } --cut-- $price=$ps_product_price-select_price($cart[$i][product_id],$cart[$i][quanti ty]); //printf(%.2f, $price[product_price]); printf(%.2f,$price); you set the select_price function to return true instead of selected price -- STOP doing things that the computer can does! -- $BS -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] getting client browser info
Thanks everybody. That is what I was needing. Question: Why is it that from an IE client I get the following: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Why does it say mozilla ??? Here's my code: Your are currently using: br ?printf ($_SERVER[HTTP_USER_AGENT]); ?br You are using : ?printf ($HTTP_USER_AGENT);? browser btw - Both produce the same. Is it because the apache webserver uses Mozilla in a default sort of way ??? hum . -- Mignon -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] getting client browser info
Hey guys, Does anyone know of script or tutorial to point me to that can obtain client browser info, (got that part) but then using php, be able to use if statements to distinguish what they're using. example msie 5.1 - netscape - aol...And act upon it. I know the logic but am clueless on the correct syntax to use with the different browser versions. Found some for asp and javascript...need php. I should probably also post this to php general Thx for any input Mignon -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] getting client browser info
-Original Message- From: Mignon Hunter [mailto:[EMAIL PROTECTED]] Sent: 20 January 2003 16:32 Question: Why is it that from an IE client I get the following: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Why does it say mozilla ??? The clue here is in the next word: compatible -- that's Microsoft Internet Explorer (MSIE) 6.0 claiming it's compatible with Mozilla 4.0 browsers (of course, it's not, but that's MS for you!). Here's my code: Your are currently using: br ?printf ($_SERVER[HTTP_USER_AGENT]); ?br You are using : ?printf ($HTTP_USER_AGENT);? browser btw - Both produce the same. Is it because the apache webserver uses Mozilla in a default sort of way ??? hum . Absolutely nothing to do with Apache -- it's just reporting what the user's browser is telling it. They're the same because they *are* the same: $HTTP_USER_AGENT is the register_globals copy of the $_SERVER[] element. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] getting client browser info
-Original Message- From: Mignon Hunter [mailto:[EMAIL PROTECTED]] Sent: 20 January 2003 17:05 Does anyone know of script or tutorial to point me to that can obtain client browser info, (got that part) but then using php, be able to use if statements to distinguish what they're using. example msie 5.1 - netscape - aol...And act upon it. Perhaps you might want to look at the get_browser() function: http://www.php.net/get-browser Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] getting client browser info
Ah, but I wasnt at a mozilla browser, I was accessing this script from a ie browser client. From my mozillia client I get the following: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020918 browser The script sits on an apache web server? On Mon, 2003-01-20 at 12:29, Ford, Mike [LSS] wrote: -Original Message- From: Mignon Hunter [mailto:[EMAIL PROTECTED]] Sent: 20 January 2003 16:32 Question: Why is it that from an IE client I get the following: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Why does it say mozilla ??? The clue here is in the next word: compatible -- that's Microsoft Internet Explorer (MSIE) 6.0 claiming it's compatible with Mozilla 4.0 browsers (of course, it's not, but that's MS for you!). Here's my code: Your are currently using: br ?printf ($_SERVER[HTTP_USER_AGENT]); ?br You are using : ?printf ($HTTP_USER_AGENT);? browser btw - Both produce the same. Is it because the apache webserver uses Mozilla in a default sort of way ??? hum . Absolutely nothing to do with Apache -- it's just reporting what the user's browser is telling it. They're the same because they *are* the same: $HTTP_USER_AGENT is the register_globals copy of the $_SERVER[] element. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- Mignon Hunter Web Developer Toshiba International 713.466.0277 x 3461 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Count AND sum columns values
Hi all, I have this table which stores products and quantities ordered by customers, and for billing purposes, I need to fetch not only how many products but also how many where ordered for each one but not detailed, but as one big result, so later I can charge for individual gift packages and stuff... How can I do this in a simple way? Thanks in advance, Cesar L. Aracena [EMAIL PROTECTED] [EMAIL PROTECTED] (0299) 156-356688 Neuquén (8300) Capital Argentina -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] getting client browser info
-Original Message- From: Mignon Hunter [mailto:[EMAIL PROTECTED]] Sent: 20 January 2003 18:40 Ah, but I wasnt at a mozilla browser, I was accessing this script from a ie browser client. Let me repeat -- that was the IE browser *masquerading* as Mozilla-compatible. ALL versions of IE do exactly the same -- you have to look at the end of the parenthesis following it to get the real version information (in this case, MSIE 6.0). Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Php and mysql, a rookie problem.
Hi, I had already install mysql and php, the apache was in my linux distribution (Mandrake) and also one php, but i have install the last version in rpm. I have stop and start the apache, and the php works without any problem. But when i call to a mysql function in the php code its give to me an error. This code is really simple, is only to prove that all works. The code is only the line : ? mysql_connect (aw, aw, pass); ? I prove in my Galeon and gives to me the error: Fatal error: Call to undefined function: mysql_connect() in /var/www/html/aw/copia.php on line 10 I do not now why give this error, the php works and in the php.ini I have include the line extension = mysql.so Is suppose that with this all must work, but it doesnt work. Anyone have any idea about why this dont work, i'm sure that must be a stupid error. Thanks.
Re: [PHP-DB] elseif with header
if ($category = 2 and $subcategory = 52) { header(Location: http://www.vanderbilt.edu/register/ca/vacation_rentals.php;); } elseif ($category = 2 and $subcategory = 50) { header(Location: http://www.vanderbilt.edu/register/ca/rentals.php;); } , etc. for some reason all the elseifs are going to the if header. any input as to how i can correct this is greatly appreciated. You are using the assignment operator (=) instead of the equals comparison operator (==) which makes your if condition always true. Larry -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Sybase_Connect
Im trying to figure out Sybase and I cant even seem to get past the first step of connecting Heres my code: ?php $con = sybase_connect(localhost, EXP, SQL); sybase_select_db(EXPADMIN); $qry = sybase_query(select * from EXP.access, $con); echo sybase_result($qry, 1, 1); sybase_close($con); ? Heres the error: Fatal error: Call to undefined function: sybase_connect() in F:\Program Files\Apache Group\Apache\htdocs\index.php on line 8 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Sybase_Connect
try to look at your php.ini file, then uncomment this line extension=php_sybase_ct.dll and also make sure that you setup your extension directory. ; Directory in which the loadable extensions (modules) reside. extension_dir = c:\php\ after that, restart your web server. best regards --buics Cameron Powell wrote: Im trying to figure out Sybase and I cant even seem to get past the first step of connecting Heres my code: ?php $con = sybase_connect(localhost, EXP, SQL); sybase_select_db(EXPADMIN); $qry = sybase_query(select * from EXP.access, $con); echo sybase_result($qry, 1, 1); sybase_close($con); ? Heres the error: Fatal error: Call to undefined function: sybase_connect() in F:\Program Files\Apache Group\Apache\htdocs\index.php on line 8 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Life is half spent before we know what it is -unknown -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Unable to load dynamic library php_oci8.dll on Windows XP SPK1
Hi, I am receiving the mensage Unable to load dynamic library C:\ApacheGroup\PHP\extensions\php_oci8.dll I am using Windows XP SPK1 with Apache2.0.43 with PHP4-4.2.3. I tried to use with Oracle but when I uncomment the line: extension=php_oci8.dll I started to receive this mensage: Unable to load dynamic library C:\ApacheGroup\PHP\extensions\php_oci8.dll Regards, Andre Matos -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Unable to load dynamic library php_oci8.dll on Windows XP SPK1
You need to have Oracle client on the machine where PHP is installed. Edin Andre Matos [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I am receiving the mensage Unable to load dynamic library C:\ApacheGroup\PHP\extensions\php_oci8.dll I am using Windows XP SPK1 with Apache2.0.43 with PHP4-4.2.3. I tried to use with Oracle but when I uncomment the line: extension=php_oci8.dll I started to receive this mensage: Unable to load dynamic library C:\ApacheGroup\PHP\extensions\php_oci8.dll Regards, Andre Matos -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] elseif with header
You can just as simply include the files you need, there is no need for using the headers. Did the script return any errors? -Oorspronkelijk bericht- Van: Addison Ellis [mailto:[EMAIL PROTECTED]] Verzonden: dinsdag 21 januari 2003 1:19 Aan: [EMAIL PROTECTED] Onderwerp: [PHP-DB] elseif with header hello and thank you... i have two pages where on 1-category is selected. on 2 subcategory is selected. on submit from page two it goes to direct.php. there i have if ($category = 2 and $subcategory = 52) { header(Location: http://www.vanderbilt.edu/register/ca/vacation_rentals.php;); } elseif ($category = 2 and $subcategory = 50) { header(Location: http://www.vanderbilt.edu/register/ca/rentals.php;); } , etc. for some reason all the elseifs are going to the if header. any input as to how i can correct this is greatly appreciated. thank you again. addison -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 [EMAIL PROTECTED] [EMAIL PROTECTED] subsidiaries of small independent publishing co. [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] postgresql primarykeys foreignkeys tablenames screenfieldlength
Any suggestions or improvements to the following code would be much appreciated. Please send me an email: function kgtables () { if ($this-connection) { $tablelist = ; $sql = SELECT . ic.relname . FROM . pg_class ic . WHERE . ic.relname not like 'pg%' . AND ic.relname not like '%pk' . AND ic.relname not like '%idx' ; $tablelist = pg_query ($this-connection, $sql); $this-num_tables = pg_num_rows($tablelist); for ($i=0; $i $this-num_tables; $i++) { $r = pg_fetch_row($tablelist); $obj-{$i + 1} = $r[0]; } pg_free_result ($tablelist); return $obj; } else { echo 'Error: failed to name the tables br /'; return 0; } } function kgprimarykeys ($tablename = ) { if ( $this-connection $tablename != ) { $keylist = ; $sql = SELECT . ic.relname AS index_name, . bc.relname AS tab_name, . ta.attname AS column_name, . i.indisunique AS unique_key, . i.indisprimary AS primary_key . FROM . pg_class bc, . pg_class ic, . pg_index i, . pg_attribute ta, . pg_attribute ia . WHERE . bc.oid = i.indrelid . AND ic.oid = i.indexrelid . AND ia.attrelid = i.indexrelid . AND ta.attrelid = bc.oid . AND bc.relname = ' . $tablename . ' . AND ta.attrelid = i.indrelid . AND ta.attnum = i.indkey[ia.attnum-1] . ORDER BY . index_name, tab_name, column_name; $keylist = pg_query ($this-connection, $sql); $this-num_primarykeys = pg_num_rows($keylist); $j = 1; for ($i=0; $i $this-num_primarykeys; $i++) { $r = pg_fetch_row($keylist); // echo Primary Key: $r[0], $r[1], $r[2], $r[3], $r[4], /br; if ( $r[4] == TRUE) { $obj-{$j} = $r[2]; $j++; } } pg_free_result ($keylist); return $obj; } else { echo 'Error: failed to name the primary keys in ' . $tablename . 'br /'; return 0; } } function kgforeignkeys ($tablename = ) { if ( $this-connection $tablename != ) { $keylist = ; $sql = SELECT conname, pg_catalog.pg_get_constraintdef(oid) as condef FROM pg_catalog.pg_constraint r WHERE r.conrelid = (SELECT c.oid FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace