[PHP-DB] sybase with php4.1 and apache 13.20 problem
Hello, I've got problem with working php 4.1.0 under apache 13.20 with Sybase SQL. I installed Sybase ASE 11.0.3 with Open Client Lib and developt part and compiled php 4.1. with sybase support ( FreeBSD 4.4) as a apache module and usual executable file. # ./configure --with-sybase=/usr/home/sybase --with-apxs php works with sybase greatfully if I execute ordinary php file with sybase_connect(..) etc. But then I execute test php page - I've got error - just the same if I lose sybase interfaces file or use wrong line in php.ini. But really - it's OK. I've got in my php.ini sybase.interface=/usr/home/sybase and php works - then executs not from apache. apache is located in /usr/local. ?phpinfo()?ph shows sybase support in php module( libphp4.so). So, I've got serious problem!! If someone can help me, please, write me without any hesitate. Denis GALINSH [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] sybase with php4.1 and apache 13.20 problem
So if I understand you correct you can call Sybase from php on commandline but not via apache? You should compile --with-sybase-ct but that is probably not causing your problem. Sounds strange, never had that problem, if it worked on cli it worked in Apache. What errormessage are you getting from Apache when trying to connect to Sybase? Regards Richard Hillström -Original Message- From: Denis GALINSH [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 03, 2002 4:23 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] sybase with php4.1 and apache 13.20 problem Hello, I've got problem with working php 4.1.0 under apache 13.20 with Sybase SQL. I installed Sybase ASE 11.0.3 with Open Client Lib and developt part and compiled php 4.1. with sybase support ( FreeBSD 4.4) as a apache module and usual executable file. # ./configure --with-sybase=/usr/home/sybase --with-apxs php works with sybase greatfully if I execute ordinary php file with sybase_connect(..) etc. But then I execute test php page - I've got error - just the same if I lose sybase interfaces file or use wrong line in php.ini. But really - it's OK. I've got in my php.ini sybase.interface=/usr/home/sybase and php works - then executs not from apache. apache is located in /usr/local. ?phpinfo()?ph shows sybase support in php module( libphp4.so). So, I've got serious problem!! If someone can help me, please, write me without any hesitate. Denis GALINSH [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] load text file
Hi, I prefer to used load data infile command to insert text file (CSV format) to MySQL. I wonder that Could load data use with pure text file (no delimiter)? if not how to insert text file in to MySQL faster than read every line? SF -- 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] Concept help required
George, =As a general comment, it is always dangerous to replicate when shifting platforms, better to reverse engineer and then implement anew and taking advantages of the strengths of the new tools. This particularly when moving into the relational field... Perhaps the use of the word 'replicate' was wrong. I am in fact re-engineering based on my knowledge of how the whole operation is performed (as I designed and built the original Filemaker/Lasso system) and trying to preserve the look and feel of the web pages. =makes perfect sense =you will need to describe the 'internal calculations' before this question can be easily/sufficiently answered. However many people fail to appreciate that the (My)SQL language offers a lot of power/functionality. In your case you are going for the PHP combination so I will be quite surprised if you 'run out' of functionality! The original Filemaker (FM) databases use calculations stored internally. You define a field to store the result of a calculation. This could be something quite complex or a static number (or string) or data from a related database. Filemaker requires a separate database to represent the equivalent of a table in standard SQL databases. Some calculation fields can be indexed and some cannot (esp those containing related data). I expect that I can replace these calculations with functions which I define. =it sounds as if you are still getting to grips with the advantages and power that SQL and relational databases bring to 'filing' tasks. There also is a terrible possibility of terminology pollution/confusion. When I last looked at FM (many, many moons ago), I consigned it to file 13 as being too much of a 'shoebox' style 'database', and my being more interested in something PC-ish that would run something more like a table-relational model (if not SQL), eg Paradox or even Access (make signs for protection and mutter incantations to ward off the evil eye...) The problem with 'shoe box' packages was that they prefered single-file solutions - it was difficult/impossible to 'relate' two files, except by producing procedural code in the package's language. Thus the data itself did not define the linkage, as it does in the relational view of the world (which I was more comfortable with coming from a mainframe-view of the world). Relational databases are made up of multiple related tables (for table you can read file, in MySQL). Shoe box databases are files. Thus there is no multiple and without the code no 'relating'. Does this make sense? Is it a fair portrayal? That being the case, you need to jettison your current understandings of some terms and FM concepts, to be able to take on board MySQL and relational technology and terminology... =let's try drawing a picture to 'see' the model you are contemplating using to upgrade your system: imagine three boxes in a row across the page. Label the left-hand one MySQL, the center one PHP, and the one on the right-hand side HTML or browser. We can then add the following functional descriptions: 'holds the data', 'handles the processing/calculations', 'displays output and collects user input'. Working at this level it should be really easy to now add a diagram for the existing FM setup; and further to draw correspondences between 'existing' and 'proposed'. However this is really simplistic, mainly because you can shift a lot of 'calculation' that FM requires/embodies, out of the central box and over to MySQL. For example, the table relationships, eg a link between the name of a 'package' in a list/table of packages, and the names of the (multiple) books within the package in a list/table of books. The 'functionality' can be implemented using the power of the SQL language (see talk of dates etc, below), but much will be 'hidden' within the standard functionality of the RDBMS engine and/or implicit in the relational model. (yes, back to the 'more reading' theme). =If you want to persue this discussion a bit further, could you list the current FM 'databases'/files and (briefly) describe how they 'fit' together? =as you can see, without giving a little more information, it is very difficult to give a satisfactory answer. How about listing your table definitions/schema. Almost any retrieval operation that does not select all of the records in a table will speed up when indexes are employed. If speed is a concern then that argues against the earlier suggestion of PostGres. I think that the table definition list would be far too long for this list. Speed is an issue as at the moment I am doing all this under my own steam in my own time (partly to extend my skills) and hope to be able to persuade my bosses that this would be a beneficial move (they are very conservative). Performance improvements would help. =you are talking as if there are numerous queries. What's wrong with performing a join, or am I missing some significance? No but I
RE: [PHP-DB] Re: Array not supported for strings???
-Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: 04 January 2002 20:24 To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: Array not supported for strings??? $stmt= SELECT country from $DB2.$geo_T1 where country_code = '$country_id[$i]' ; Well, this should be where country_code = '${country_id[$i]}' to be sure of doing what you want. This code: $country[] = $row-country; Creates following error msg: Fatal error: [] operator not supported for strings Is this error coming from PHP or your database? And does it definitely refer to this particular line? 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, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Concept help required
DL Neil (I presume you have a first name tucked away inside there), Your comments are appreciated. I am becoming more and more comfortable with what I am doing with MySQL/PHP. With reference to the 3-box trick, I thought that the bulk of my work would be inthe centre box but as you point out that would be inefficient if the work can be pre-processed in the RDBMS box. A simple explanation of my Filemaker system follows. But first, a description of what the service provides might help. Our members (50+ uk universities) can request material (usually book chapters or journal articles) to be delivered electronically (or rarely, by paper) to their students. We handle copyright clearance through the UK rights agency (CLA) and through publishers/authors. We pass the prices back to the clients via the web interface and the client accepts/declines. We then source originals from the British Library which are digitised by a bureau and put into PDF before a front page is attached (currently automated using Applescript but hope to use PDFlib in future) and delivered to the university. We invoice monthly for items completed, not by course. We have a success rate of 60% mainly due to the reluctance of publishers having their material mounted on the web. Now the system: (number of current records in parentheses) Transactions (15000+) [contains a record for each requested extract with workflow and cost information] Course (900+) [Holds data for courses such as student numbers, dates etc] Bib_source (6000+) [Book or journal data held here at title level] Bib_extract (9000+) [Chapter/article level data held] Publishers (18000+) [Rightsholder details data bought in] Customers (50+) [Client details] Buyers (200+) [Individuals who can make purchasing decisions at clients] Illustrations (150+) [Illustrations require special handling and there can be several per extract] Invoices (300+) [data taken from Transactions and Customers to produce PDF invoices] Userlog (4000++) [log of users accessing main system] Weblog (500+) [covers whole site and started in December] Staff (10+) [Staff names, addresses, emails etc] Scanrates [CLA-provided table to store pre-priced material - covers about 40% of requests] Helpdesk-general [General helpdesk alloowing LAN-wide staff access and direct responses to users] Helpdesk-transactional [As above but specifically set up to handle problems about individual transactions] I run a dual site with a main 'Live' service and a Training service allowing users to play with the processes before they get near the real thing. I'll need to leave now to pick the kids up from school as the wife is ill. I'll see your comments tomorrow when I get back in. Regards George - Original Message - From: DL Neil [EMAIL PROTECTED] To: George Pitcher [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, January 08, 2002 1:07 PM Subject: Re: [PHP-DB] Concept help required George, =As a general comment, it is always dangerous to replicate when shifting platforms, better to reverse engineer and then implement anew and taking advantages of the strengths of the new tools. This particularly when moving into the relational field... Perhaps the use of the word 'replicate' was wrong. I am in fact re-engineering based on my knowledge of how the whole operation is performed (as I designed and built the original Filemaker/Lasso system) and trying to preserve the look and feel of the web pages. =makes perfect sense =you will need to describe the 'internal calculations' before this question can be easily/sufficiently answered. However many people fail to appreciate that the (My)SQL language offers a lot of power/functionality. In your case you are going for the PHP combination so I will be quite surprised if you 'run out' of functionality! The original Filemaker (FM) databases use calculations stored internally. You define a field to store the result of a calculation. This could be something quite complex or a static number (or string) or data from a related database. Filemaker requires a separate database to represent the equivalent of a table in standard SQL databases. Some calculation fields can be indexed and some cannot (esp those containing related data). I expect that I can replace these calculations with functions which I define. =it sounds as if you are still getting to grips with the advantages and power that SQL and relational databases bring to 'filing' tasks. There also is a terrible possibility of terminology pollution/confusion. When I last looked at FM (many, many moons ago), I consigned it to file 13 as being too much of a 'shoebox' style 'database', and my being more interested in something PC-ish that would run something more like a table-relational model (if not SQL), eg Paradox or even Access (make signs for protection and mutter incantations to ward off the evil eye...) The problem with 'shoe box' packages was that they
RE: [PHP-DB] Oracle date conversion
-Original Message- From: David C. Norris [mailto:[EMAIL PROTECTED]] Sent: 26 December 2001 17:00 Oracle DATEs are retrieved (by ora_fetch_into($cursor, $row, ORA_FETCHINTO_NULLS), for example) as plain dates (e.g., '26-DEC-01'), losing the time of day (as in '26-DEC-01 12:34:56'). Is this a bug? No, this is the default ORACLE format for retrieved dates. Is there a workaround that doesn't involve rewriting the query? No, but modifying the query to use a date format is actually the best solution. This would give you something like: SELECT TO_CHAR(DATE, 'DD-MON-YY HH:MI:SS') AS DATE_TIME FROM TBL Look up the definition of the TO_CHAR function for the full list of format elements available for formatting DATEs. 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, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] oracle connectivity problem
-Original Message- From: Rajiv Khandelwal [mailto:[EMAIL PROTECTED]] Sent: 27 December 2001 10:59 hi, I am facing a strange problem. I have oracle 8.1.6 (server) installed on linux and am trying to access it thru PHP from a client machine (again Linux). I was successful in making connections to the Oracle Server through programs written in C and Perl. But everytime i execute some program written in PHP it throws back an error. Fatal error: Call to undefined function: ocilogon() in /usr/local/apache/htdocs/test.php in test.php i am calling ocilogon as: ocilogon (scott,tiger,$db); I have installed PHP with oracle support. phpinfo() shows that oracle support is enabled and it identifies ORACLE_HOME and ORACLE_SID. Have you installed Oracle 8 support (--with-oci8), which gives you the OCI functions, or only the older Oracle support (--with-oracle) which gives you the ORA_ series of functions? 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, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] mysql_num_rows
-Original Message- From: Gurhan Ozen [mailto:[EMAIL PROTECTED]] Sent: 06 January 2002 20:10 I am pretty sure that the query is correct. here is the actual query: $query=select distinct(nodeid), nodename from books where bookid=$bookid; $result=mysql_query($query); $num_results=mysql_num_rows($result); snip The funny thing is that if i write the same query without where bookid=$bookid then the mysql_num_rows works but with where statement it doesn't. Have you echoed $result to see what it contains? My guess is that it contains something unexpected which, when inserted into the query, causes it to fail (or at least return no rows!). Otherwise, I can see no reason for the addition of the WHERE clause to cause this error. 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, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] mysql_num_rows
don't know if this makes a difference, but i've always used WHERE bookid = '$bookid'; - single quote round the $bookid variable - not sure if that's the problem, or if it's just good practice? -Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]] Sent: 08 January 2002 14:07 To: 'Gurhan Ozen'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql_num_rows -Original Message- From: Gurhan Ozen [mailto:[EMAIL PROTECTED]] Sent: 06 January 2002 20:10 I am pretty sure that the query is correct. here is the actual query: $query=select distinct(nodeid), nodename from books where bookid=$bookid; $result=mysql_query($query); $num_results=mysql_num_rows($result); snip The funny thing is that if i write the same query without where bookid=$bookid then the mysql_num_rows works but with where statement it doesn't. Have you echoed $result to see what it contains? My guess is that it contains something unexpected which, when inserted into the query, causes it to fail (or at least return no rows!). Otherwise, I can see no reason for the addition of the WHERE clause to cause this error. 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, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.312 / Virus Database: 173 - Release Date: 31/12/01 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.312 / Virus Database: 173 - Release Date: 31/12/01 -- 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] mysql_num_rows
-Original Message- From: Gurhan Ozen [mailto:[EMAIL PROTECTED]] Sent: 06 January 2002 20:10 I am pretty sure that the query is correct. here is the actual query: $query=select distinct(nodeid), nodename from books where bookid=$bookid; $result=mysql_query($query); $num_results=mysql_num_rows($result); snip The funny thing is that if i write the same query without where bookid=$bookid then the mysql_num_rows works but with where statement it doesn't. Have you echoed $result to see what it contains? My guess is Sorry, that should be $bookid...!! that it contains something unexpected which, when inserted into the query, causes it to fail (or at least return no rows!). Otherwise, I can see no reason for the addition of the WHERE clause to cause this error. 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, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] mysql_num_rows
-Original Message- From: matt stewart [mailto:[EMAIL PROTECTED]] Sent: 08 January 2002 14:10 don't know if this makes a difference, but i've always used WHERE bookid = '$bookid'; - single quote round the $bookid variable - not sure if that's the problem, or if it's just good practice? Depends on whether $bookid is a string or a number. If your id values are always numeric, there's really no point in quoting them in the query. On the other hand, if they can be strings it's pretty vital to quote them!! 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, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] mysql_num_rows
dont u need to add the $sql to the mysql_query... as in mysql_query($sql,$db); ?? i thourhgt u did ? anyways.. might be wrong. Neil - Original Message - From: Ford, Mike [LSS] [EMAIL PROTECTED] To: 'Gurhan Ozen' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, January 08, 2002 6:07 AM Subject: RE: [PHP-DB] mysql_num_rows -Original Message- From: Gurhan Ozen [mailto:[EMAIL PROTECTED]] Sent: 06 January 2002 20:10 I am pretty sure that the query is correct. here is the actual query: $query=select distinct(nodeid), nodename from books where bookid=$bookid; $result=mysql_query($query); $num_results=mysql_num_rows($result); snip The funny thing is that if i write the same query without where bookid=$bookid then the mysql_num_rows works but with where statement it doesn't. Have you echoed $result to see what it contains? My guess is that it contains something unexpected which, when inserted into the query, causes it to fail (or at least return no rows!). Otherwise, I can see no reason for the addition of the WHERE clause to cause this error. 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, 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] Re: database/form help needed
Turn your checkboxes into an array input type =checkbox name=id[] val=?php echo $thisid ? And then parse the array when you POST the form while (list($key,$val)=each($id)) { echo $val; // this is an id that was checked } // end while The virtue of this is you don't have to check for all possible values (id1, id2, id3, etc), you'll only end up working with checkboxes that have been checked. kind regards, bill Chris Payne wrote: Hi there everyone, I have a loop which goes through my MySQL database and some PHP code which grabs results 9 at a time, and that works great. Now, I also have a checkbox called ID for each of the 9 entries and here is my problem. How can I dynamically assign a unique ID for my checkboxes? I am getting my checkboxes through a loop, and because of that the ID is called id - for all of my entries, so I can't select multiple as only one entry comes out on the results page. How can I dynamically create checkboxes with a unique id (Such as id1, id2 etc ...) so that I can make multiple selections from my DB? Thank you all so much - Happy New Year. Regards Chris Payne www.planetoxygene.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] mysql_num_rows
Drop the $result from the mysql_num_rows() so it reads: $num_results=mysql_num_rows(); Depending upon the PHP version, that might do the trick for you. kind regards, bill Mike Ford wrote: -Original Message- From: Gurhan Ozen [mailto:[EMAIL PROTECTED]] Sent: 06 January 2002 20:10 I am pretty sure that the query is correct. here is the actual query: $query=select distinct(nodeid), nodename from books where bookid=$bookid; $result=mysql_query($query); $num_results=mysql_num_rows($result); snip The funny thing is that if i write the same query without where bookid=$bookid then the mysql_num_rows works but with where statement it doesn't. Have you echoed $result to see what it contains? My guess is that it contains something unexpected which, when inserted into the query, causes it to fail (or at least return no rows!). Otherwise, I can see no reason for the addition of the WHERE clause to cause this error. 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, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] mysql.so
Hello all, I'm trying to recompile PHP, I downloaded V4.1.1 and wanted to move from my old 4.0.6 to it. I have a RH 6.2, btw. I had mysql.so, oci8.so and a couple more libraries. I think I had downloaded them from rpmfind or similar site. How do I recompile them to work with PHP 4.1? I tried building PHP --with-mysql as a configure option and mysql gets compiled inside php, but I wanted it as a library. I am compiling php as a loadable module for apache, BTW, but I will be using it as a CGI too. Thank you, Andrea = Andrea Trasatti Bware Technologies s.r.l. via San Gregorio, 3 Tel. +39 02 2779181 Fax +39 02 27791828 Cell +39 335 7866749 WWW http://www.bware.it = -- 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] oracle connectivity problem
It sound like you have Oracle installed on one machine and are attempting to connect to it from another machine. If this is the case you may need to install the client libraries on the machine that does not have oracle installed. I recently did some development for a client in Windows and received the same error. After I read the PHP docs (http://www.php.net/manual/en/ref.oci8.php) and installed the client libraries on the Windows machine, I was able to connect to Oracle running on a Sun machine. Hope this helps... -Original Message- From: Rajiv Khandelwal [mailto:[EMAIL PROTECTED]] Sent: 27 December 2001 10:59 hi, I am facing a strange problem. I have oracle 8.1.6 (server) installed on linux and am trying to access it thru PHP from a client machine (again Linux). I was successful in making connections to the Oracle Server through programs written in C and Perl. But everytime i execute some program written in PHP it throws back an error. Fatal error: Call to undefined function: ocilogon() in /usr/local/apache/htdocs/test.php in test.php i am calling ocilogon as: ocilogon (scott,tiger,$db); I have installed PHP with oracle support. phpinfo() shows that oracle support is enabled and it identifies ORACLE_HOME and ORACLE_SID. _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- 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] mysql.so
Old modules (compiled for php 4.0.x) are not binary compatible with 4.1.x series. To compile oci8.so you need an oracle installation. More info on oracle from Thies Arntzen. I'm not sure but ./configure --enable-mysql make will produce the .so Regards, Andrey Hristov - Original Message - From: Andrea Trasatti [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 08, 2002 6:30 PM Subject: [PHP-DB] mysql.so Hello all, I'm trying to recompile PHP, I downloaded V4.1.1 and wanted to move from my old 4.0.6 to it. I have a RH 6.2, btw. I had mysql.so, oci8.so and a couple more libraries. I think I had downloaded them from rpmfind or similar site. How do I recompile them to work with PHP 4.1? I tried building PHP --with-mysql as a configure option and mysql gets compiled inside php, but I wanted it as a library. I am compiling php as a loadable module for apache, BTW, but I will be using it as a CGI too. Thank you, Andrea = Andrea Trasatti Bware Technologies s.r.l. via San Gregorio, 3 Tel. +39 02 2779181 Fax +39 02 27791828 Cell +39 335 7866749 WWW http://www.bware.it = -- 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] adding $ to my file
Hi All I am trying to add this to a file on my system $var = $string_submited_by_form All i get when i run the script is an input to my file like this = string_submited_by_form whithou the $var at the beging Can anyone please help. Thanks in Advance Dave C The two rules for success are: 1. Never tell them everything you know. -- 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] adding $ to my file
try addslashes() function -Original Message- From: Dave Carrera [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 08, 2002 12:05 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] adding $ to my file Hi All I am trying to add this to a file on my system $var = $string_submited_by_form All i get when i run the script is an input to my file like this = string_submited_by_form whithou the $var at the beging Can anyone please help. Thanks in Advance Dave C The two rules for success are: 1. Never tell them everything you know. -- 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] Trouble with date column
Hello, My boss is going through the mysql.com tutorials starting at ... http://www.mysql.com/articles/ddws/12.html ... and currently stuck at ... http://www.mysql.com/articles/ddws/13.html The boss is using phpMyAdmin to access the database, and everything has been working just fine until it gets to a database query where it's using a date column (JokeDate) in the where clause. The query is shown below and the phpMyAdmin error is also shown... SELECT COUNT(*) FROM Jokes WHERE JokeDate = 2000-01-01 MySQL said: Lost connection to MySQL server during query The database table is defined thusly: CREATE TABLE Jokes ( ID int(11) DEFAULT '0' NOT NULL auto_increment, JokeText text, JokeDate date DEFAULT '-00-00' NOT NULL, PRIMARY KEY (ID) ); With three rows of information in it. Even if I change the query to : select * from Jokes where JokeDate = 2001-01-01 -or- select * from Jokes where JokeDate = '2001-01-01' -or even- select ID, JokeText, JokeDate from Jokes where JokeDate = '2001-01=01' ... it just doesn't work and it returns the Lost Connection error. If I select on a different column (like ID or JokeText) it works just fine. The MySQL database is 3.22.26a running on a Solaris through iPlanet webserver on a test machine/database and Apache on production machine/database. Any help. Thanks in advance. -- __ _Tyler Nally / /__ _(_)___ _ _ [EMAIL PROTECTED] / / _ \/ __ `/ / __ \/ __ \ / __ \/ ___/ __ `/ 317-860-3016 / / __/ /_/ / / /_/ / / / // /_/ / / / /_/ / American Legion Website /_/\___/\__, /_/\/_/ /_(_)/_/ \__, /http://www.legion.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]
Re: [PHP-DB] Concept help required
George, DL Neil (I presume you have a first name tucked away inside there), =David Your comments are appreciated. I am becoming more and more comfortable with what I am doing with MySQL/PHP. =I have found it to be an excellent combination (even on Windows) and have used them as the means of a gradual introduction to the LAMPs platform. With reference to the 3-box trick, I thought that the bulk of my work would be inthe centre box but as you point out that would be inefficient if the work can be pre-processed in the RDBMS box. =Yes, the simplistic diagram has served its purpose! The right-hand box is 'done' (as far as design is concerned) - per earlier comments. Thus it would be tempting to move one step left/to the center. There are two ways to approach a design: 'bottom-up' or 'top-down'. Many coders have taught themselves and tend towards 'bottom up', ie start with the first line of code and iterate/improve their implementation until the program actually does what seems to be required. Project managers and designers prefer to work top-down: show me the whole picture and then let's get it split up into component parts until those parts are small enough to be a single, easily implemented unit. =Prevailing wisdom in system design suggests that the data should be 'designed' first, and 'code'/processing only later (relational or structured design philosophy, even object-oriented design). Accordingly I recommend considering which parts of your current files should be converted into MySQL tables, and what might need to be added/subtracted to ensure that the relationships between tables is adequately expressed/because that makes other 'old data' unnecessary. As you would seem to have identified your data, and grouped/categorised it into tables, you might be able to go straight into the process of 'normalising' your data - a series of steps/techniques which enable you to analyse the data and structure it into a 'relational' form. (if you are not familiar with this term: it's back to the books) A simple explanation of my Filemaker system follows. But first, a description of what the service provides might help. Our members (50+ uk universities) can request material (usually book chapters or journal articles) to be delivered electronically (or rarely, by paper) to their students. We handle copyright clearance through the UK rights agency (CLA) and through publishers/authors. We pass the prices back to the clients via the web interface and the client accepts/declines. We then source originals from the British Library which are digitised by a bureau and put into PDF before a front page is attached (currently automated using Applescript but hope to use PDFlib in future) and delivered to the university. We invoice monthly for items completed, not by course. We have a success rate of 60% mainly due to the reluctance of publishers having their material mounted on the web. =thanks for this, now I have a better view of where you are going. =Have I misunderstood? It seems to me that you are not offering this data to the web, ie I can't get to it; you are only offering it to the copyright fee-paying clients. Hence the publishers' argument seems illogical/ignorant... Now the system: (number of current records in parentheses) Transactions (15000+) [contains a record for each requested extract with workflow and cost information] Course (900+) [Holds data for courses such as student numbers, dates etc] Bib_source (6000+) [Book or journal data held here at title level] Bib_extract (9000+) [Chapter/article level data held] Publishers (18000+) [Rightsholder details data bought in] Customers (50+) [Client details] Buyers (200+) [Individuals who can make purchasing decisions at clients] Illustrations (150+) [Illustrations require special handling and there can be several per extract] Invoices (300+) [data taken from Transactions and Customers to produce PDF invoices] Userlog (4000++) [log of users accessing main system] Weblog (500+) [covers whole site and started in December] Staff (10+) [Staff names, addresses, emails etc] Scanrates [CLA-provided table to store pre-priced material - covers about 40% of requests] Helpdesk-general [General helpdesk alloowing LAN-wide staff access and direct responses to users] Helpdesk-transactional [As above but specifically set up to handle problems about individual transactions] I run a dual site with a main 'Live' service and a Training service allowing users to play with the processes before they get near the real thing. =and now a third environment: for development, and a fourth: for system testing... I'll need to leave now to pick the kids up from school as the wife is ill. I'll see your comments tomorrow when I get back in. =I have similar issues. I'll be around tomorrow (Wed) morning (GMT), but unlikely to get back during the afternoon. =Regards, =dn - Original Message -
[PHP-DB] count query
Is it posible to do a count(*) on a tabe where id=2 and count just those that id = 2
Re: [PHP-DB] count query
Barry, Is it posible to do a count(*) on a tabe where id=2 and count just those that id = 2 =why don't you try it? The answer is yes, because count(*) means count the entire number of non-null rows selected. See manual: 3.3.4.8 Counting Rows =dn -- 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] count query
Hi, SELECT SUM(IF(id = '2',1,0)) AS field_name FROM table Versatile command - you can use it for quite a lot of things. Barry Rumsey wrote: Is it posible to do a count(*) on a tabe where id=2 and count just those that id = 2 -- -- Dan Barton Terrestrial Program Biologist Asst. Data Manager Point Reyes Bird Observatory http://www.prbo.org [EMAIL PROTECTED] [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] Concept help required
For DL Neill: Like the 3 box approach. A very strong image for separating the functionality. Why don't you write it up as an article for DevShed or WebMonkey? If you look at the traffic on the list there are lots of people who just see PHP pages as happening and have no clear understanding of what happens and where it happens. For George: You have a very interesting system there. DL is right, don't try to reverse engineer, start with a clean sheet and go from there. You have the advantage of knowing what results you want and the nature of the processing steps. With a relational database you will be freed from the procedural code necessary to fetch data. Use this link for a quick look at Codd's 12 rules which define a relational database: http://www.databaseanswers.com/codds_rules.htm Nice pictures! Take some comfort that there is no RDBMS today which fulfills all these rules, just as none fully comply with the SQL1 and SQL2 standards. Regards - Miles At 01:52 PM 1/8/2002 +, George Pitcher wrote: DL Neil (I presume you have a first name tucked away inside there), Your comments are appreciated. I am becoming more and more comfortable with what I am doing with MySQL/PHP. With reference to the 3-box trick, I thought that the bulk of my work would be inthe centre box but as you point out that would be inefficient if the work can be pre-processed in the RDBMS box. stuff snipped as I'm just passing out bouquets ... -- 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: Pulling a long list of data stalls PHP
Miles, you wrote: Is your table indexed on the field your query is based on? That will greatly speed up the query. Miles Thompson I'm afraid in my case, the query needs to be pretty much a complete table dump. Even if I filter a subset the data, my relational DB experience (not deep, admittedly, and only with enterprise products like Oracle and ... ugh... MSSql) tells me that indices on tables less than a few thousand entires cost more in upkeep than they gain in response. And this is only about 300-400 rows... and more to the point, this happens when I pull more than 30 of them or so! I feel that something MUST be wrong! But all of that aside, the problem isn't just that it takes a long time... the problem seems to be that it literally *crashes* the instance of PHP! (The webpage never finishes loading, and the CPU meter drops back down to idle levels, and if I cancel the webpage, I leave an orphaned instance of PHP.exe running, which I cannot kill even from my Win2000 Task Manager). I mean, I'm a newbie and I'll admit that, but that just Don't seem Right. Does ANYONE have any idea what might be happening and how I can fix it? Please? :) -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]
Re: [PHP-DB] Re: Pulling a long list of data stalls PHP
Peter, That's not right, but please forgive me if there is some background I've misplaced and I'm asking old questions. What OS are you on? What database? (I'm assuming MySQL, just because it's so common.) What version of the database? What version of PHP? Can you execute your SELECT at the database console and get a fast response? (I think so, if I correctly remember an earlier post.) Are you testing on the same machine PHP/Web Server/database is on? Across a LAN? Across Internet? How big a set of data are you returning? (# records) * (bytes/record) This is a long shot, and I'm only making it on the SWAG that you are running on Windows. There are 2 versions of the PHP.INI file. Somewhere on this list I read that someone was using the optimized version and was having a lot of trouble. After switching to the other one the problems went away. I've not used PHP on Windows, but this is essentially a diagnostic procedure, so it's worth working through. Miles Thompson PS I've read the other message too, just chose this one to reply to. (It's 11:00 PM here in NS, and I want to go to bed. Tomorrow I have to go out early, but I will check your reply later.) At 09:38 PM 1/8/2002 -0500, Peter Westergaard wrote: Miles, you wrote: Is your table indexed on the field your query is based on? That will greatly speed up the query. Miles Thompson I'm afraid in my case, the query needs to be pretty much a complete table dump. Even if I filter a subset the data, my relational DB experience (not deep, admittedly, and only with enterprise products like Oracle and ... ugh... MSSql) tells me that indices on tables less than a few thousand entires cost more in upkeep than they gain in response. And this is only about 300-400 rows... and more to the point, this happens when I pull more than 30 of them or so! I feel that something MUST be wrong! But all of that aside, the problem isn't just that it takes a long time... the problem seems to be that it literally *crashes* the instance of PHP! (The webpage never finishes loading, and the CPU meter drops back down to idle levels, and if I cancel the webpage, I leave an orphaned instance of PHP.exe running, which I cannot kill even from my Win2000 Task Manager). I mean, I'm a newbie and I'll admit that, but that just Don't seem Right. Does ANYONE have any idea what might be happening and how I can fix it? Please? :) -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 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] Re: Pulling a long list of data stalls PHP
Something more ... 1. Put something like this in your code where you execute the query $ result = mysql_queyr($sql) or die( mysql_errno(). : .mysql_error()); 2. If the query is succesful, just dump the result w/o any formatting, just in case the problem's there. (Shouldn't be with IE, it's remarkably tolerant. 3. When you view the source of the page in IE what do you see? Does it look right? 4. There's always our old Windows standby -- reinstall the software! But let's not do that yet. Miles At 09:38 PM 1/8/2002 -0500, Peter Westergaard wrote: Miles, you wrote: Is your table indexed on the field your query is based on? That will greatly speed up the query. Miles Thompson I'm afraid in my case, the query needs to be pretty much a complete table dump. Even if I filter a subset the data, my relational DB experience (not deep, admittedly, and only with enterprise products like Oracle and ... ugh... MSSql) tells me that indices on tables less than a few thousand entires cost more in upkeep than they gain in response. And this is only about 300-400 rows... and more to the point, this happens when I pull more than 30 of them or so! I feel that something MUST be wrong! But all of that aside, the problem isn't just that it takes a long time... the problem seems to be that it literally *crashes* the instance of PHP! (The webpage never finishes loading, and the CPU meter drops back down to idle levels, and if I cancel the webpage, I leave an orphaned instance of PHP.exe running, which I cannot kill even from my Win2000 Task Manager). I mean, I'm a newbie and I'll admit that, but that just Don't seem Right. Does ANYONE have any idea what might be happening and how I can fix it? Please? :) -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 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] mail() function
Hi all, I use mail() function to send automatic email to me but when I receive the email, I found that send date is not correct (send date is in future) How do I correct this problem I use PHP 4.1.0 platform win98se apache 1.3.22 Thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: Pulling a long list of data stalls PHP [_SOLVED_]
Thanks to Miles! The problem, for anyone who is going through this themselves lay (in my case) with my php.ini file - evidently my fat fingers copied the 'recommended' php.ini file, instead of the 'distro' php.ini file. The 'Recommended' file contains a few optimizations and security patches, recommended for a live-on-the-internet application. I don't know what about that setup was incompatible with my application, but something was. Maybe some day when I have a clue I'll figure it out. For now, I'm back up and running. Thanks, Miles. -Peter -- 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]