Re: [PHP-DB] Is MySQL in 4.0.6?
On Tuesday 26 June 2001 10:43, Karsten Dambekalns wrote: The small size package contains only the binary without any additional modules. Get the full size version, or compile yourself. BTW: I think that is explained on the download page. The small size package *does* include MySQL support (but as with all versions of php, it does not include MySQL itself). Cheers -- Phil Driscoll -- 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 do I keep the values of objects when refreshing page?
Hi all, My page is getting the values and the submits itself displaying the information but the original selection is gone showing the objects with no info. Thanks, -- === Hector M Banda Fax: (425) 790-6379 === -- 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/mysql horizontal listing query
on 6/26/01 10:43 AM, Matt Nigh at [EMAIL PROTECTED] wrote: I need a section of a record label site with a releases section listed horizontally but here's the twist: after every 4 releases, I want the releases to move to the next columns below. ex. release#1, release#2, release#3, release#4 release#5, release#6 Basically you need to use the modulus operator. Here's a rough example (untested): ?php // set number of rows $n = 4; // initialize cell count $c = 0; // start table code (omitted) echo 'tr'; // perform your query (omitted) while ($row = mysql_fetch_array($query,$conn)) { // make a new row if we reached the end of one // but don't do it for the first row. if ($c % $n == 0 $c = $n) { echo '/trtr'; } echo 'td'; // spit out all your mysql fields (omitted) echo '/td'; // increment your cellcounter; $c++; } // make sure you don't have a malformed table while ($c % $n != 0) { echo 'tdnbsp;/td'; $c++; } echo '/tr'; // end table code (omitted) ? Hope that helps. Sincerely, Paul Burney ++ Paul Burney Webmaster Open Source Developer UCLA - GSEIS - ETU (310) 825-8365 [EMAIL PROTECTED] http://www.gseis.ucla.edu/ ++ -- 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] error ORA-12699
I have installed NT4+PHP+ORACLE8.0.4+APACHE in my computer. I want to access ORACLE server to another computer from web server. It is ok to access ORACLE SERVER with PERL, but i cannot access using PHP. The first error is ora-12514 , but i change, change and change, now it is always ORA-12699 Native service internal error . ?php ocilogon("system","manager",""); ? Warning: _oci_open_server: ORA-12699:Native service internal error Thanks in advance. sang -- 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] making queries
Yes, it's possible. What you do is write the var names and values after the page name as follows: a href=mylink.php?foo=barbar=fooclick my link/a This would call a script called mylink.php, initializing two vars, namely $foo (containing the value 'bar') and $bar (containing the value 'foo'). So, to pass info to a script using a link, call the script with a ? followed by varname=varvalue, and if you need to pass more info to the script, seperate the vars with a /Christian -Original Message- From: Andrew Aitken [mailto:[EMAIL PROTECTED]] Sent: 26. juni 2001 20:56 To: [EMAIL PROTECTED] Subject: [PHP-DB] making queries This is just a quick question. I'd like to no if it's possiable to make a normal link supply infromation to a page of PHP very much like a form and if so how? Thankyou for any help at all Andrew Aitken -- 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/mysql horizontal listing query
Hi, may be this will be helpfull $res=mysql_query(select release from tbl_release); for ($i=1;$i=4;$i++){ if ($i==1)echo tr; $row=mysql_fetch_row($res); if ($row) echo TD$row[0]/TD; else { $end=1; echo tdnbsp;/td; } if ($i!=4)echo 'TDnbsp;/TD'; if ($i==4){ echo /TR; if (!$end)$i=0; } } Dobromir Velev -Original Message- From: Matt Nigh [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wednesday, June 27, 2001 4:33 AM Subject: [PHP-DB] php/mysql horizontal listing query hello knowledgeable people of the php-db list, i have a question for you regarding PHP using MySQL. my problem is this: I need a section of a record label site with a releases section listed horizontally but here's the twist: after every 4 releases, I want the releases to move to the next columns below. ex. release#1, release#2, release#3, release#4 release#5, release#6 each release is stored in a database called almavale_releases and there are 6 rows: id, bandname, albumtitle, coverpic, albumcode, datereleased so what i need to know is what php code do I need to accomplish this? your help is greatly appreciated and give my thanks in advance. email me offlist with your solutions/suggestions or send it to the list. it's great to see the php/db experts sharing their knowledge with the not-so-experts like myself on this list, I learn new stuff all the time on this great list! Matt -- 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] Variable Variables in PHP
? You are allowed the have input fields with the same name on a form, the browser creates an array of these fields, e.g. to access them using javascript form.name[index].value. You need to inform php that these fields are arrays by putting an '[]' after the INPUT fields name. Then when the form is submitted php will create arrays for the multiple input fields. You can also use an index value to specify each fields location in the array. $result = mysql_query(SELECT * FROM name_and_email); $num = mysql_numrows($result); if ($num!=0) { $i = 0; PRINT FORM action='test.php'; WHILE ($i $num) { $name = mysql_result($result,$i,name); $email = mysql_result($result,$i,email); $id = mysql_result($result,$i,id); PRINT INPUT type='text' name='name[$id]' value='$name'; modified PRINT INPUT type='text' name='email[$id]' value='$email'BR; modified $i++; } PRINT INPUT type='submit'/FORM; } ? To create the query you can simple loop through the arrays e.g. foreach ($name as $k=$v) { $sql = sprintf(UPDATE . name_and_email . SET . name = '%s',email = '%s' . WHERE . id = '%s', $v, $email[$k], $k); // run query etc.. } -Original Message- From: Morgan Tocker [mailto:[EMAIL PROTECTED]] Sent: 27 June 2001 03:04 To: [EMAIL PROTECTED] Subject: [PHP-DB] Variable Variables in PHP I am having trouble with variable variables; I want to create a form as follows :- ? $result = mysql_query(SELECT * FROM name_and_email); $num = mysql_numrows($result); if ($num!=0) { $i = 0; PRINT FORM action='test.php'; WHILE ($i $num) { $name = mysql_result($result,$i,name); $email = mysql_result($result,$i,email); $id = mysql_result($result,$i,id); PRINT INPUT type='text' name='name$id' value='$name'; PRINT INPUT type='text' name='email$id' value='$email'BR; $i++; } PRINT INPUT type='submit'/FORM; } ? ## THIS SHOULD SUBMIT SOMETHING LIKE THIS test.php?name1=avalueemail1=avalueagainname2=secondnameemail2=secondemail THE PROBLEM: From PHP with variable variables, how do I change $name1 and $email1 into - ## for all $name.$x values do this.. $sql = UPDATE name_and_email SET name = '$name1', email = '$email1' WHERE id = '$id'; Many thanks if someone can help, Morgan Tocker. -- 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] Storing Code in a db?
Hey there, Is it possible to store code like a function, for example, in a mysql database and pull it into a php dynamicallly so you can use the function if needed? Mark
Re: [PHP-DB] error ORA-12699
Sang, Since you're trying to connect from another computer to the Oracle server, you probably need to specify a connect string in the OCILogon command. OCILogon('system', 'manager', $connect_string); What's the value for $connect_string? It depends on how you've set-up your Oracle networking. If you can access your DB from that client machine with SQL*Plus, then you must be loging in via the following format: sqlplus system/manager@connect_string Use the value of connect_string for $connect_string. It should be defined in your tnsnames.ora file on your client, and have a corresponding entry in your listern.ora file on your server. I suspect that your client machine is trying to access an Oracle database on itself, because no connect string was specified. Lemme know if this helps, Anthony From: sang [EMAIL PROTECTED] Date: Wed, 27 Jun 2001 18:59:31 +0900 To: [EMAIL PROTECTED] Subject: [PHP-DB] error ORA-12699 I have installed NT4+PHP+ORACLE8.0.4+APACHE in my computer. I want to access ORACLE server to another computer from web server. It is ok to access ORACLE SERVER with PERL, but i cannot access using PHP. The first error is ora-12514 , but i change, change and change, now it is always ORA-12699 Native service internal error . ?php ocilogon(system,manager,); ? Warning: _oci_open_server: ORA-12699:Native service internal error Thanks in advance. sang -- 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] Extracting enum/set values from database
On Fri, Jun 22, 2001 at 04:45:53PM -0700, Todd A. Jacobs wrote: Is there a way to dynamically build an option list from an enum/set type? In other words, if I don't know the possible values of the enum or set field ahead of time, how can I retrieve that information at run-time? Here is a function I use to dynamically build an option list. You send it the table and column. Database and columnType are optional. The function returns the values of the column as an array. ?php function getEnumValues($table, $column, $database=default, $columnType=enum) { $mylink = connect(); $sql = describe $table; $thisResult = mysql_db_query($database, $sql, $mylink); while($table = mysql_fetch_array($thisResult)) { if($table[Field] == $column $columnType == enum) { return explode(,, preg_replace(/^enum\(|'|\)/i, , $table[Type])); } elseif($table[Field] == $column $columnType == set) { return explode(,, preg_replace(/^set\(|'|\)/i, , $table[Type])); } } } ? -- Jason Stechschulte [EMAIL PROTECTED] -- It is my job in life to travel all roads, so that some may take the road less travelled, and others the road more travelled, and all have a pleasant day. -- Larry Wall in [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] error ORA-12699
I have read some doc. $connect_string is set to equal from tnsnames.ora. $connect_string=(DESCRIPTION=(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.1)(PORT = 1521))(CONNECT_DATA = (SID = ORCL))); I can connect my local oracle server before when using OCILogon(system,manager); But now , i cannot connect local oracle server!! It is always said the ORA-12699 error! I donot know what is wrong. sang Anthony Carlos [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Sang, Since you're trying to connect from another computer to the Oracle server, you probably need to specify a connect string in the OCILogon command. OCILogon('system', 'manager', $connect_string); What's the value for $connect_string? It depends on how you've set-up your Oracle networking. If you can access your DB from that client machine with SQL*Plus, then you must be loging in via the following format: sqlplus system/manager@connect_string Use the value of connect_string for $connect_string. It should be defined in your tnsnames.ora file on your client, and have a corresponding entry in your listern.ora file on your server. I suspect that your client machine is trying to access an Oracle database on itself, because no connect string was specified. Lemme know if this helps, Anthony From: sang [EMAIL PROTECTED] Date: Wed, 27 Jun 2001 18:59:31 +0900 To: [EMAIL PROTECTED] Subject: [PHP-DB] error ORA-12699 I have installed NT4+PHP+ORACLE8.0.4+APACHE in my computer. I want to access ORACLE server to another computer from web server. It is ok to access ORACLE SERVER with PERL, but i cannot access using PHP. The first error is ora-12514 , but i change, change and change, now it is always ORA-12699 Native service internal error . ?php ocilogon(system,manager,); ? Warning: _oci_open_server: ORA-12699:Native service internal error Thanks in advance. sang -- 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] Modify Query, or sift through results?
I've got a script that searches a db every night and sends out e-mail if it finds something a person would be interested in, based on criteria they gave us. The problem is that I have one field that stores regions of the country in a very unpleasant way. It stores them as: Northeast;West;South So all of the regions for one record go into one field. The problem is that when searching that, if someone has a preference of 'North', I dont want to pull records that have 'Northeast', as would happen with the above example. Is there a way to modify the MySQL query so as to find only 'North', keeping in mind that 'North' may be the 3rd in a list of semi-colon separated regions? Or do I need to sift through the results in PHP to clean them up? Thanks, Joe -- 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] Variable Variables in PHP
On Wed, Jun 27, 2001 at 12:03:42PM +1000, Morgan Tocker wrote: ## THIS SHOULD SUBMIT SOMETHING LIKE THIS test.php?name1=avalueemail1=avalueagainname2=secondnameemail2=secondemail THE PROBLEM: From PHP with variable variables, how do I change $name1 and $email1 into - ## for all $name.$x values do this.. $sql = UPDATE name_and_email SET name = '$name1', email = '$email1' WHERE id = '$id'; Put it inside of a loop. for($i = 1; $i 3; $i++) { echo ${name$i}; } This will print out both names. Hopefully you can figure out how to modify this to create the sql code you want. -- Jason Stechschulte [EMAIL PROTECTED] -- It's the Magic that counts. -- Larry Wall on Perl's apparent ugliness -- 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] perl fork() in PHP?
Can I do something similar to the perl fork() in php and if so, does anyone know of any examples of this. regards Tom Hodder -- 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] FW: strange numbers in link
Our website uses mysql/php. I found the link written below as a hard coded link and I can't figure out why the programmer would have used c2x5han as a keyword instead of using chan as the keyword- which is an acronym for Child Health Nutrition. A HREF=/sources/search.php3?type=electronickeywords=c2x5hanoffset=0Child Health amp; Nutrition/A I thinking about changing the link but not sure what the repercussions would be - if any? Does any one have any ideas as to the logic of using c2x5han? Thank you, Shawna Contact Information: Shawna C. Gibbs Website Technical Assistant Global Health Council 20 Palmer Court White River Junction, VT 05001 USA tel: 802.649.1340 fax: 802.649.1396 email: [EMAIL PROTECTED] website: http://www.globalhealth.org Contact Information: Shawna C. Gibbs Website Technical Assistant Global Health Council 20 Palmer Court White River Junction, VT 05001 USA tel: 802.649.1340 fax: 802.649.1396 email: [EMAIL PROTECTED] website: http://www.globalhealth.org -- 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]