Re: [PHP-DB] Retrieving Rows - Can I Change The Order?
> Now then, I have changed a column in the table, and the only way I found to > change a data type is to delete the offending column and then add it again. > > When I do the select now the new column, which was at $row[3] is now always > $row[39]. I don't mind this, because I know where it is, but is there any > way I can make it appear at $row[3] again? I'm sure you can imagine when > there are quite a few pages using this code it's easier to reorder the > columns in the select than to change all my if() codes! Maybe I am missing what you are trying to do but it sounds like you are just trying to sort your columns. If that is what you are asking then why dont you do your query like this: select * from $table where $column = '$value' ORDER BY $column I hope this is what you were asking and that is helps you out. > > By the way, I know I can be explicit by SELECTing each column by name, but > I'ds rather use a SELECT * fror this partucular instance. > > Any ideas? Or am I just being lazy (it's been a long night after all!)? > > > TIA > > > Dave -- 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] function ??
are INSERT INTO statements forbiden inside a function?? Dave -- 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] Submitting a form with the Enter button
IF I click this submit button: then (isset($submit_key) ) is TRUE IF i press my ENTER button instead of click it then (isset($submit_key) ) is FALSE.. is this normal behavior? Ken -- 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] Re: Not Really A DB Question
> "Peter J. Krawetzky" <[EMAIL PROTECTED]> wrote in > message 001001c11697$fe331d40$[EMAIL PROTECTED]">news:001001c11697$fe331d40$[EMAIL PROTECTED]... > How do you loop through all the text objects in a PHP script? In otherwords, > I want use logic to check the value of each textbox without specifically > referencing the actual object name. Name all your textboxes as "tb_whatever", then function isTextBox($varname) { return (eregi("^tb_", $varname)); } and you can check through all passed vars like foreach($HTTP_GET_VARS as $key => $val) if (isTextBox($key)) checkValue($val); foreach($HTTP_POST_VARS as $key => $val) if (isTextBox($key)) checkValue($val); > Visual Basic has this type of logic. Oh, WELL then :-P -- 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] Re: Tree Display
"Sharif Islam" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I am still trying to figure out how to do it. I want to display my result > from the data base in tree/menu like system. Could you give us your SELECT statement and one row of returned data? > So the result page will look like this: > > +Result1 (you click this , it will expand) > -Item1 (you click this and get more info) > -Item2 > -Item3 The expanding tree bit is done in JavaScript, see http://kmserv.com/testbed/tree/smith_jstree.html for a simple tutorial. What you need to do is use PHP to write the JavaScript to create the tree according to your query results. -- 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] ODBC and PHP
I´m using PHP 4 with ODBC and sometimes I get a response that was unable to connect to the MSSQL database. Then I go to the ODBC configuration to test the connection and I get a response that everything is working fine, but my pages still can´t connect. Is that normal? What can I do? I´m using NT Server 4 with apache 1.3. []s Ariadne -- 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] Not Really A DB Question
This is not VB - this is better. Probably want to name all of your text fields something similar, since they'll be mixed in with the drop downs, radio buttons, etc... Check $HTTP_POST_VARS and $HTTP_GET_VARS in your form's target. -Szii - Original Message - From: "Peter J. Krawetzky" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, July 27, 2001 5:30 AM Subject: [PHP-DB] Not Really A DB Question How do you loop through all the text objects in a PHP script? In otherwords, I want use logic to check the value of each textbox without specifically referencing the actual object name. Visual Basic has this type of logic. -- 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] Tree Display
I am still trying to figure out how to do it. I want to display my result from the data base in tree/menu like system. So the result page will look like this: +Result1 (you click this , it will expand) -Item1 (you click this and get more info) -Item2 -Item3 +Result2 -Item1 -Item2 All the records will be pulled from the same table. Any hint? -- 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] Record Update Link
I seem to be having difficulty creating a hypertext link between the results of a sql query, ie a a formated page with a contact record (FirstName, LastName, etc.) to a page that will allow for editing. The results page is text only and the edit/update page has text boxes. Not sure if this clear, but any help would be greatly 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] report style printing
Use PHP's mail() function to send it to your customer, store in a directory from they can FTP it. Miles At 08:45 AM 7/27/01 +0700, Sommai Fongnamthip wrote: >OK. How do I operate when finished generate text file or report file in >server? Could I download it and to view / print from client report viewer? > >Sommai > >At 09:32 27/7/2001 +0800, Beau Lebens wrote: >>i am also a tad confused. >>i have produced numerous reports in differing formats from PHP and a mysql >>database, using things such as many figures to calculate hours/dollar value >>for work in a timesheet format, text-based "comment" reports and simple >>archive reports for student details, these were all just formatted how i >>wanted them to print in the html, and then the user clicks print in their >>browser and they have a report. >> >>if you are referring to a "Custom Report Style" as in a different file >>format, then the most useful way I found of doing this is by generating a >>CSV file, or a tab delimited .txt file, which can then be opened in Excel or >>similar to display tabulated data, and most programs which manipulate data >>will accept a CSV file as input, and then manipulate it in different ways >>from there... >> >>hope something in there helps >> >>Beau >> >>// -Original Message- >>// From: [EMAIL PROTECTED] >>// [mailto:[EMAIL PROTECTED]] >>// Sent: Thursday, 26 July 2001 9:53 PM >>// To: Sommai Fongnamthip; [EMAIL PROTECTED] >>// Subject: Re: [PHP-DB] report style printing >>// >>// >>// >>// I'm confused - what do you mean? When you use the terms >>// "Browser Style" and >>// "Custom Report Style" are you referring to style sheets, a >>// property of a >>// particular browser, or what? >>// >>// If style sheets, keep in mind that different browsers react >>// in unique ways >>// to style sheets. >>// >>// As I understand PHP you use it to generate HTML output, >>// which more or less >>// constrains you to what you see in the browser. You can also >>// create a text >>// file and email it to the user, or display it in the browser, >>// but that will >>// involve programming the report in PHP, there is no report writer. >>// >>// Regards - Miles Thompson >>// >>// >>// >>// At 10:02 AM 7/26/01 +0700, Sommai Fongnamthip wrote: >>// >Hi, >>// > When I retrieve data to display on web with PHP, >>// it can print out >>// > from web in Browser Stlye. How could we have some PHP >>// code to retrieve >>// > current display data into PC and print it with some Custom >>// Report Style? >>// > >>// >Sommai Fongnamthip >>// > >>// > >>// >-- >>// >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 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] report style printing
> > At 10:02 AM 7/26/01 +0700, Sommai Fongnamthip wrote: > >Hi, > > When I retrieve data to display on web with PHP, it can print out > > from web in Browser Stlye. How could we have some PHP code to retrieve > > current display data into PC and print it with some Custom Report Style? > > the long way is to setup an ODBC with m$ access and let the access report writer handle all the pretty printing... -- Leo G. Divinagracia III [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 and Informix installation
OK, I set my LIBS environment variable to my esql -libs result and the confire shell is OK now, but now I get the next error when running the make command : # make ===> src make[1]: Entering directory `/tmp/apache_1.3.20' make[2]: Entering directory `/tmp/apache_1.3.20/src' ===> src/os/unix gcc -c -I../../os/unix -I../../include -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0 .6/main -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I/tmp /php-4.0.6/TSRM -I/tmp/php-4.0.6/TSRM -I/tmp/php-4.0.6 -DUSE_EXPAT -I../../lib/e xpat-lite -DNO_DL_NEEDED `../../apaci` os.c gcc -c -I../../os/unix -I../../include -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0 .6/main -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I/tmp /php-4.0.6/TSRM -I/tmp/php-4.0.6/TSRM -I/tmp/php-4.0.6 -DUSE_EXPAT -I../../lib/e xpat-lite -DNO_DL_NEEDED `../../apaci` os-inline.c rm -f libos.a ar cr libos.a os.o os-inline.o true libos.a <=== src/os/unix ===> src/ap gcc -c -I../os/unix -I../include -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0.6/mai n -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I/tmp/php-4 .0.6/TSRM -I/tmp/php-4.0.6/TSRM -I/tmp/php-4.0.6 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED `../apaci` ap_cpystrn.c gcc -c -I../os/unix -I../include -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0.6/mai n -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I/tmp/php-4 .0.6/TSRM -I/tmp/php-4.0.6/TSRM -I/tmp/php-4.0.6 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED `../apaci` ap_execve.c gcc -c -I../os/unix -I../include -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0.6/mai n -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I/tmp/php-4 .0.6/TSRM -I/tmp/php-4.0.6/TSRM -I/tmp/php-4.0.6 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED `../apaci` ap_fnmatch.c gcc -c -I../os/unix -I../include -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0.6/mai n -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I/tmp/php-4 .0.6/TSRM -I/tmp/php-4.0.6/TSRM -I/tmp/php-4.0.6 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED `../apaci` ap_getpass.c gcc -c -I../os/unix -I../include -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0.6/mai n -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I/tmp/php-4 .0.6/TSRM -I/tmp/php-4.0.6/TSRM -I/tmp/php-4.0.6 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED `../apaci` ap_md5c.c gcc -c -I../os/unix -I../include -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0.6/mai n -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I/tmp/php-4 .0.6/TSRM -I/tmp/php-4.0.6/TSRM -I/tmp/php-4.0.6 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED `../apaci` ap_signal.c gcc -c -I../os/unix -I../include -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0.6/mai n -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I/tmp/php-4 .0.6/TSRM -I/tmp/php-4.0.6/TSRM -I/tmp/php-4.0.6 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED `../apaci` ap_slack.c gcc -c -I../os/unix -I../include -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0.6/mai n -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I/tmp/php-4 .0.6/TSRM -I/tmp/php-4.0.6/TSRM -I/tmp/php-4.0.6 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED `../apaci` ap_snprintf.c gcc -c -I../os/unix -I../include -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0.6/mai n -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I/tmp/php-4 .0.6/TSRM -I/tmp/php-4.0.6/TSRM -I/tmp/php-4.0.6 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED `../apaci` ap_sha1.c gcc -c -I../os/unix -I../include -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0.6/mai n -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I/tmp/php-4 .0.6/TSRM -I/tmp/php-4.0.6/TSRM -I/tmp/php-4.0.6 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED `../apaci` ap_checkpass.c gcc -c -I../os/unix -I../include -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0.6/mai n -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I/tmp/php-4 .0.6/TSRM -I/tmp/php-4.0.6/TSRM -I/tmp/php-4.0.6 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED `../apaci` ap_base64.c gcc -c -I../os/unix -I../include -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0.6/mai n -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I/tmp/php-4 .0.6/TSRM -I/tmp/php-4.0.6/TSRM -I/tmp/php-4.0.6 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED `../apaci` ap_ebcdic.c rm -f libap.a ar cr libap.a ap_cpystrn.o ap_execve.o ap_fnmatch.o ap_getpass.o ap_md5c.o ap_si gnal.o ap_slack.o ap_snprintf.o ap_sha1.o ap_checkpass.o ap_base64.o ap_ebcdic.o true libap.a <=== src/ap ===> src/main gcc -c -I../os/unix -I../include -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0.6/mai n -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I/tmp/php-4 .0.6/TSRM -I/tmp/php-4.0.6/TSRM -I/tmp/php-4.0.6 -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED `../apaci` gen_test_char.c gcc -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/main -I/tmp/ php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I
[PHP-DB] Re: results testing
Dave. Is this what you mean? In the example below, you won't fall into the while loop unless you get a row back from the statement handle ($sth). $dbh = ibase_connect( $connect, $this->login, $this->passwd ) $sth = ibase_query( $sql, $dbh ); while ( $row = ibase_fetch_row ( $sth ) ) { // do something with $row array } HTH Jeffery Cann [EMAIL PROTECTED] wrote: > I have had no success finding a thread on the subject of how to test > results of a query. I know it can be positive without finding any rows. > What are the ways to test. > Dave > -- 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] results testing
I have had no success finding a thread on the subject of how to test results of a query. I know it can be positive without finding any rows. What are the ways to test. Dave -- 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] writing an Oracle blob to file system?
I need to pull oracle blobs out of the database and write them to the file system (Solaris). Has anyone had any success doing this? Tom -- 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] Re: Help accessing Interbase (win) with PHP4
Use $dbh = ibase_connect ("database", "user", "password", "ISO8859_1", 0, 1); The extra arguments are needed for any interbase < 6.0 -- Jeremy Bettis [EMAIL PROTECTED] "Maxim Pavlov" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > I have Interbase 5.5 running on NT box, and the goal is to access it from > Apache/PHP on Linux box. > The following code is quite trivial, but in my case it doesn't work. I found > many similar posts searching Internet on that, but did not find an answer. > > $dbh = ibase_connect("douglas.akl1.ru:d:\\path\\lyceum.gdb", "user", > "password"); > $stmt = "SELECT * FROM examen;"; > $sth = ibase_query ($dbh, $stmt); <-- problem is here > .. > ibase_close($dbh); > ?> > > > All it gives is "Warning: InterBase: Dynamic SQL Error SQL error code = -901 > feature is not supported in /home/maxim/public_html/index.php on line 4" > > Please help! > > Maxim Pavlov > > -- 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] Re: Problems with update und delete's
It sounds like your 'id' column does not have an index. Jeff Uli wrote: > Hallo! > > Maybe you can help me with my problems. > > I have a html form that deletes (or updates) over a php-script datas from > my database like "delete from table_name where id=xy" > > and it works correctly. > > But when I have about 100 entries in my database then it takes about 50 > sec. to delete an entry. > > Do you know what it can be > > Please send replies to this newsgroup or to [EMAIL PROTECTED] > > Thanx a lot. > > Uli > > > -- 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] Problems with update und delete's
Its a mySQL DB at a providers Server, so I think the memory and the cache schould be okay. Mybe this helps: The HTML File look like this: Do really want to delete this entry and the function in the admin_index.php3 looks like this function delete_entry($svid) { $connectionID = FncOpenDatabase (); //this function works $svSQL = "delete from $cfgTabContent where id=$svid"; //heres the string $result = mysql_query( $svSQL, $connectionID); if ($result){return "1";} else {return "0";} } and it works "fast", about 2 secs, when there are about 30 entries in the table, but it takes longer (about 50secs) when there are about 100 entries in the table. the id is indexed. maybe you have any ideas?? "Peter J. Krawetzky" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 000a01c116a9$cd867630$[EMAIL PROTECTED]">news:000a01c116a9$cd867630$[EMAIL PROTECTED]... > How many rows are in the table? Is the "id" column indexed? It looks like > it's scanning through each row to find a match. How long does it take to > delete just the one row? If it's 2 seconds, then that delete is acting the > same way. > > If you have a very small table, then it sounds like the database is swapping > out to disk for each delete thus increasing your response time. You need to > look at how much cache is available and the amount of memory on your server. > -Original Message- > From: Uli <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] <[EMAIL PROTECTED]> > Date: Friday, July 27, 2001 10:28 AM > Subject: [PHP-DB] Problems with update und delete's > > > >Hallo! > > > >Maybe you can help me with my problems. > > > >I have a html form that deletes (or updates) over a php-script datas from > my > >database like "delete from table_name where id=xy" > > > >and it works correctly. > > > >But when I have about 100 entries in my database then it takes about 50 > sec. > >to delete an entry. > > > >Do you know what it can be > > > >Please send replies to this newsgroup or to [EMAIL PROTECTED] > > > >Thanx a lot. > > > >Uli > > > > > > > >-- > >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] PATCH for 9i support (was Re: [PHP-DB] Re: Oracle 9i Support)
On Thursday, July 26, 2001 at 9:48 PM, Sommai Fongnamthip said: > I have oracle 8i in Linux server. How could I > connect it with PHP (on other server)? Install the Oracle Client software (on the other server). --- Brian S. Dunworth Sr. Software Development Engineer Oracle Database Administrator The Printing House, Ltd. (850) 875-1500 x225 --- -- 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] Problems with update und delete's
How many rows are in the table? Is the "id" column indexed? It looks like it's scanning through each row to find a match. How long does it take to delete just the one row? If it's 2 seconds, then that delete is acting the same way. If you have a very small table, then it sounds like the database is swapping out to disk for each delete thus increasing your response time. You need to look at how much cache is available and the amount of memory on your server. -Original Message- From: Uli <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date: Friday, July 27, 2001 10:28 AM Subject: [PHP-DB] Problems with update und delete's >Hallo! > >Maybe you can help me with my problems. > >I have a html form that deletes (or updates) over a php-script datas from my >database like "delete from table_name where id=xy" > >and it works correctly. > >But when I have about 100 entries in my database then it takes about 50 sec. >to delete an entry. > >Do you know what it can be > >Please send replies to this newsgroup or to [EMAIL PROTECTED] > >Thanx a lot. > >Uli > > > >-- >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] Problems with update und delete's
Hallo! Maybe you can help me with my problems. I have a html form that deletes (or updates) over a php-script datas from my database like "delete from table_name where id=xy" and it works correctly. But when I have about 100 entries in my database then it takes about 50 sec. to delete an entry. Do you know what it can be Please send replies to this newsgroup or to [EMAIL PROTECTED] Thanx a lot. Uli -- 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] Search Query
You'll need three pages: in the first one put submit it to the second page where you have: $sql = "select * from contacts where (FirstName like '%$contactname%' or LastName like '%$contactname%') and Active='yes' order by ID"; $result = mysql_query($sql); $numrows = mysql_num_rows($result); if ($numrows>0) { while ($list = mysql_fetch_array($result)) { echo "".$list["FirstName"]." ".$list["LastName"].""; }} And in the third page: $sql = "select * from contacts where ContactID='$ID'"; $result = mysql_query($sql); $numrows = mysql_num_rows($result); if ($numrows>0) { while ($list = mysql_fetch_array($result)) { just echo the details that you need. }} Hope this is what you want Kind Regards, Cami -Original Message- From: Steve Fitzgerald [mailto:[EMAIL PROTECTED]] Sent: Friday, July 27, 2001 3:04 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Search Query I'm trying to build a search query that will allow users to search (via a textbox) different tables. For example, I have a table name contacts with columns ContactID, FirstName, LastName, and Active. I want to be able to search for John Smith or Smith where Active=yes (as opposed to Active=no which would indicate the contact is no longer active). I would then like to have the result(s) to have a link to their respective ContactID. I don't think this is that difficult, but I'm having difficulty applying the SELECT statement with the text box. Any help would be greatly appreciated. Steve Fitzgerald -- 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] Search Query
I'm trying to build a search query that will allow users to search (via a textbox) different tables. For example, I have a table name contacts with columns ContactID, FirstName, LastName, and Active. I want to be able to search for John Smith or Smith where Active=yes (as opposed to Active=no which would indicate the contact is no longer active). I would then like to have the result(s) to have a link to their respective ContactID. I don't think this is that difficult, but I'm having difficulty applying the SELECT statement with the text box. Any help would be greatly appreciated. Steve Fitzgerald -- 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 and Informix installation
Hi, To be honest I don't know if PHP will work with version 5.x of Informix. I think it must be 7.x. At least that's for the SE version. In case I'm wrong for On-Line you can have a go but you'll have to specify the libs manually when compiling Apache. If you run esql -libs this will list the libs you need. I have shown the ones for my machine but just check your own and put them in IFX_LIBS as like something below: # get these by running esql -libs at the prompt IFX_LIBS="-lifsql -lifasf -lifgen -lifos -lifgls -lnsl_s -lcrypt_i \ /usr/lib/libgen.a -lsocket -lnsl -lm -lsuds -ltinfo -lprot -lx \ -ltinfo -lm -lc /usr/informix/lib/esql/checkapi.o -lifglx" # Add any extra libs in here if required LIBS="$IFX_LIBS" export LIBS ./configure --prefix=$APACHE_DIR \ --activate-module=src/modules/php4/libphp4.a Regards, - Paul - - Original Message - From: "Muciño Zúñiga Marco Antonio" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 26, 2001 6:35 PM Subject: [PHP-DB] PHP and Informix installation Hi, I installed php y my UNIX SCO Openserver and it works fine. Now, in the same server is installed the Informix Online 5.10. I want to access the Informix databases then I run the next commands successfully: cd php-4.0.6 ./configure --with-apache=../apache_1.3.20 --enable-track-vars --with-informix=/usr/informix make make install cd ../apache_1.3.20 ./configure --prefix=/usr/internet/apache --activate-module=src/modules/php4/libphp4.a All is OK until the last command (./configure ...) I get the error messages: # ./configure --prefix=/usr/internet/apache --activate-module=src/modules/php4/libphp4.a Configuring for Apache, Version 1.3.20 + using installation path layout: Apache (config.layout) + activated php4 module (modules/php4/libphp4.a) Creating Makefile Creating Configuration.apaci in src Creating Makefile in src + configured for SCO 5 platform + setting C compiler to gcc + setting C pre-processor to gcc -E + checking for system header files + adding selected modules o php4_module uses ConfigStart/End + checking sizeof various data types + doing sanity check on compiler and options ** A test compilation with your Makefile configuration ** failed. The below error output from the compilation ** test will give you an idea what is failing. Note that ** Apache requires an ANSI C Compiler, such as gcc. cd ..; gcc -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/TSRM -I/tmp/php-4.0 .6/TSRM -I/tmp/php-4.0.6 -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED `./apaci` -o helpers/dummy helpers/dummy.c -L/usr/informix/lib -L/usr/informix/lib/ esql -L/tmp/php-4.0.6/ext/informix -L/usr/informix/lib -L/usr/informix/lib/esql -L/tmp/php-4.0.6/ext/informix -Lmodules/php4 -L../modules/php4 -L../../modules/ php4 -lmodphp4 -lifsql -lifasf -lifgen -lifos -lifgls -lnsl_s -lcrypt_i -lgen -lsocket -lnsl -lsuds -ltinfo -lprot -lx -ltinfo -lc -lphpifx -lifglx -lcrypt -l m -lsocket -lsocket -lsocket -lmalloc -lprot -ltinfo -lx -lm Undefined first referenced symbol in file getspnam/usr/informix/lib/esql/libifos.so helpers/dummy: fatal error: Symbol referencing errors. No output written to help ers/dummy make: *** [dummy] Error 1 Error Output for sanity check = End of Error Report = Aborting! Looks like the library libifos.so is wrong, does anyone have an idea what's going on? Thanks in advance. Marco Muciño -- 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] Not Really A DB Question
How do you loop through all the text objects in a PHP script? In otherwords, I want use logic to check the value of each textbox without specifically referencing the actual object name. Visual Basic has this type of logic.
[PHP-DB] Help accessing Interbase (win) with PHP4
Hello, I have Interbase 5.5 running on NT box, and the goal is to access it from Apache/PHP on Linux box. The following code is quite trivial, but in my case it doesn't work. I found many similar posts searching Internet on that, but did not find an answer. All it gives is "Warning: InterBase: Dynamic SQL Error SQL error code = -901 feature is not supported in /home/maxim/public_html/index.php on line 4" Please help! Maxim Pavlov -- 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] Re: (preg_match ?
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > $search = "TheName" > $data = "TheName,TheAddress,ThePhone" > > if (preg_match('"/\b'.$search.'\b/i"', $data)) > { > echo "True"; > } > else > { > echo "False"; > } > I am trying to see if the search name matches exactly a name in the $data. In that case, may I suggest an alternative method? $arr=explode(",",lower($data)); if(in_array(lower($search),$arr))) ... (If you want to use the preg_*: take out the double quotes in your regex, which do not appear to be delimiting the substrings within variable $data.) -- CC -- 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]