Re: [PHP-DB] Interbase Problem
What OS is running in the InterBase machine? Are you running IB Classic or SuperServer? I haven't seen this error but have read about it a few times, in those cases the machine was running Windows NT and IB SS. -Jorge Niel Zeeman [EMAIL PROTECTED] escribió en el mensaje 9h76jh$ik6$[EMAIL PROTECTED]">news:9h76jh$ik6$[EMAIL PROTECTED]... Now the site will be running fine and then something will just trigger the ibase server and it will push it into a flatline for anything between 1 to 10 minutes. -- 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] sql problem
SELECT @A:=SUM(salary) FROM table1 WHERE type=1; UPDATE table2 SET summmary=@A WHERE type=1; What does @A: mean? Thank you very much! -- 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] PHP Bug with InterBase
The following bug report was posted to an InterBase newsgroup: --- Anyone who are using PHP + Interbase should be aware of this bugs especially when trying to retrieve IB decimal/float data type from a stored procedure(s). I have reproduced this error that seems as a bug on PHP when retrieving data from ib that could be found in the attached file. i tried to execute this query from IBConsole: SELECT * FROM TEST_P; and the result is: 94000581000 85000587000 27058581000 12334547000 12345678000 while PHP shows: -488699512.21 -898758920.19 1288777224.6 -550354888.2 -539223888.2 TEST.SQL --- create table test tbvalue decimal(18,3) ); commit work; insert into test values(94000581); insert into test values(85000587); insert into test values(27058581); insert into test values(12334547); insert into test values(1234567; commit work; set term ^; create procedure test_p returns spvalue decimal(18,3) ) as begin for select tbValue from test into :spvalue do begin spvalue = spvalue * 1000; suspend; end end ^ set term ;^ commit work; --- TEST.PHP - $dbh = ibase_connect(datacenter:d:/currdata/test.gdb,sysdba,xxx); $sql_stat = select spvalue from test_p;; $ibqry= ibase_query($dbh, $sql_stat); while ($row = ibase_fetch_row($ibqry)) print $row[0]. ; } ibase_close($dbh); ? --- I've confirmed this on a Windows platform using Apache, PHP 4.05 and Interbase 6.01, however the person reporting this confirmed that the bug is not present in a Linux environment. Any insight is appreciated. Regards, -Jorge -- 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] sql problem
Fai [EMAIL PROTECTED] wrote in message 9h90l2$1op$[EMAIL PROTECTED]">news:9h90l2$1op$[EMAIL PROTECTED]... SELECT @A:=SUM(salary) FROM table1 WHERE type=1; UPDATE table2 SET summmary=@A WHERE type=1; What does @A: mean? Thank you very much! They're writing the sum to an SQL variable. -- 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] Oracle Client to connect to remote DB
I read a post on faqt.com that said that I could connect to a remote Oracle DB if I had the Oracle client installed. Does anyone know where I can get a copy of only the client for Linux? I don't want to install the whole Oracle package, I use MySQL on the server, but have a client that is needing to connect to an Oracle DB on their server from mine. Any suggestions? Thanks, Jeff -- 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] Is MySQL in 4.0.6?
on 6/25/01 3:46 PM, Adam Lundrigan at [EMAIL PROTECTED] wrote: Is MySQL included in the 406kb version of PHP 4.0.6? When I try to connect to MySQL (after adding localhost paswords to php.ini) using this version it says: Warning: Can't connect to MySQL server on 'localhost' (10061) in mysql_local_test.php on line 2 From what i've heard, MySQL is included in PHPbut why doesn't the connect work if it is included? Though I haven't checked in version 4.0.6, typically MySQL *support* is included with PHP. That entails the necessary MySQL header files so that PHP can compile with MySQL support. You still need to download and install MySQL on the machine. You can find packages and more information at: http://www.mysql.com/ 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] db2 (or any unified ODBC db), php, stored procedures, and OUT parameters
I am trying to return an OUT or INOUT parameter from a stored procedure call to PHP via the Unified ODBC functions. I've RTFM and I don't see anything on this. I've tried to pass a variable to an INOUT parameter via the parameters array in odbc_execute. Is there any trick or hack to work around this. I'm trying to return a string from a DB2 (SQL-Procedural Language) stored procedure to PHP. I'd appreciate any help. I wouldn't mind hearing back from anyone whose tried the same thing with other databases using the Unified ODBC library. Thanks for any help in advance, Alex Mikhail
Re: [PHP-DB] Is MySQL in 4.0.6?
At 8:16 PM -0230 6/25/01, Adam Lundrigan wrote: Is MySQL included in the 406kb version of PHP 4.0.6? When I try to connect to MySQL (after adding localhost paswords to php.ini) using this version it says: Warning: Can't connect to MySQL server on 'localhost' (10061) in mysql_local_test.php on line 2 From what i've heard, MySQL is included in PHPbut why doesn't the connect work if it is included? The client library is included (if you build with --with-mysql), but you have to be running a server somewhere that you can connect to. -Adam Lundrigan CEO, VPU http://www.vpu-virtual.com/ ICQ # 73617446 [EMAIL PROTECTED] -- Paul DuBois, [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] Query in a function
How about declaring some of the variables as global variables. regards seriousj wrote: Hello I have a query that I have placed in a function that is in a file that I include in the page to be displayed. It doesn't work. I know that the code works because when I place the code in the page to be displayed directly it works fine. I can't figure it out. Thanks in advance for any help. John Here is the function contained in lib.inc: function type_select() { $connection = mysql_connect($server, $user, $pass); echo(select name=\type_id\); $query1 = SELECT * FROM type; $result1 = mysql_db_query($db, $query1, $connection); echo(!isset($type_id)?option value=\\--Please select a Type--/option:); if(mysql_num_rows($result1) 0) { while($row1 = mysql_fetch_array($result1)) { $result1_type_id = $row1[type_id]; $result1_type_desc = $row1[type_description]; echo(option ); echo(isset($type_id)?($result1_type_id==$type_id ? selected : ):); echo(value=\); echo($result1_type_id); echo(\); echo( $result1_type_desc); echo(/option); } } else { echo(option value=\error\Error/option); } echo(/select); } And here is the call to that function in the page that is displayed: include(lib.inc); ? form method=post action=disp_item_test.php ? //TYPE selection if(!isset($type_id)) { type_select(); } And here is the error message: Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /web/sites/268/seriousj/www.mccartney.f2s.com/opus/tnzp/lib.inc on line 21 -- 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] Interbase Problem
Hi We are running Firebird 0.94 SS on RedHat 7.1 Compaq Server Hope this rings a bell?? Niel Jorge Alvarez [EMAIL PROTECTED] wrote in message 9h90ja$1a8$[EMAIL PROTECTED]">news:9h90ja$1a8$[EMAIL PROTECTED]... What OS is running in the InterBase machine? Are you running IB Classic or SuperServer? I haven't seen this error but have read about it a few times, in those cases the machine was running Windows NT and IB SS. -Jorge Niel Zeeman [EMAIL PROTECTED] escribió en el mensaje 9h76jh$ik6$[EMAIL PROTECTED]">news:9h76jh$ik6$[EMAIL PROTECTED]... Now the site will be running fine and then something will just trigger the ibase server and it will push it into a flatline for anything between 1 to 10 minutes. -- 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] sql problem
@a is here an internal 'session' variable used in sql databases (atleast mysql). simple usage : select @a:=1; - 1 select @b:=10; - 10 select @a + @b; - 11 These variables are used to hold temporary numbers and characters, so the interaction between the script language and the database can be held to a minimum. Mats Remman PHP Developer, MySQL DBA Coretrek, Norway +47 51978591 / +47 91623566 -Original Message- From: Fai [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 5:55 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] sql problem SELECT @A:=SUM(salary) FROM table1 WHERE type=1; UPDATE table2 SET summmary=@A WHERE type=1; What does @A: mean? Thank you very much! -- 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] upload problem ...
He! Don't use the function 'copy', but 'move_uploaded_file'. Ready... Daniel Kieviet Xsarus Internetdiensten Holland [EMAIL PROTECTED] - Original Message - From: Andre P. [EMAIL PROTECTED] To: Steve Brett [EMAIL PROTECTED] Cc: php-db@lists. php. net (E-mail) [EMAIL PROTECTED] Sent: Monday, June 25, 2001 6:17 AM Subject: Re: [PHP-DB] upload problem ... Steve, When you use input type=file the web server uploads the file to a temporary directory which it must have write access to, i.e. the user that the httpd process is run as must have write access to /php/tmp. To my knowledge there is no way of allowing the httpd process to write to that directory using your ftp users/password. Bear in mind that you could change the temporary upload directory from /php/tmp to /tmp. do you have full access to you box or only an account? hope this helps ciao Andre. Steve Brett wrote: hi, i have a site and need to write a script to upload / download files so the database can be updated / backed up. i've tried setting up an input type=file ... and this works fine on my machine but php gives an eror onthe server saying that the /php/tmp dir cannot be written to by, i assume, the nobody account within whihc the web server runs. i need to be bale to write to the httpd dir using php and then i can get the db to import the files. i have an ftp username and password but don't know how to get php to pass the authorisation the server. the site is already password protected just using a table of username / passowrds. many thanks in advance Steve -- 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] Database access using ODBC
Thanks for the reply. When it didn't work, I downloaded and installed the mdac 2.6 and the up to date jet service pack. Still no joy. $DBConn is coming back as integer 1 so that seems ok. I have tested the DSN using MSQuery and it is connecting ok. I have also turned tracing on for the dsn and the trace says that it connects successfully but then nothing else. I am a bit lost after this. Anyone any suggestions? Thanks, Colum Original Message: - From: [EMAIL PROTECTED] (Miles Thompson) Date: Mon, 25 Jun 2001 18:22:52 -0300 To: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [PHP-DB] Database access using ODBC Colum, Did you check out www.php.net/odbc_Exec One of the solutions posted in the comments was to download and install a new ODBC driver from MSFT. Are you getting a valid integer returned to $DBConn? NOt worked with this, but I hope those are helpful suggestions - Miles Thompson At 08:38 AM 6/25/01 -0400, [EMAIL PROTECTED] wrote: Hi, Long time reader, first time poster! I am new to php coming from a generally MS (unfortunately) background (Access, VB, SQLServer) and I am looking to branch out a bit. I have a client who wishes to have an internet front-end to an Access database. I am using php with odbc to access this and (as I am a newbie), I am having problems with the connection. After I do an odbc_pConnect, when I call the odbc_exec, I get the usual error, Warning: Supplied agrument is not a valid ODBC-Link resource. The ODBC DSN is setup as standard (no default login etc). The following code is being used for db access: function DBRetrieve($pSQLStr) { global $DBConn, $DBQryID, $DBQryRows, $DBQryColumns; $DBDsn='PHPTEST'; $DBUser='Admin'; $DBPassword =''; #Open a persistent connection to the database if (!$DBConn = (odbc_pConnect($DBDsn, $DBUser, $DBPassword) or die(Database Execution Error: . odbc_Error() . . odbc_ErrorMsg( { echo \nError connecting to database\n; return false; } #Send query to database if (!$DBQryID=(odbc_Exec($DBConn, $pSQLStr) or die(Database Execution Error: . odbc_Error() . . odbc_ErrorMsg( { echo \nError executing database request: [ODBC_EXEC]\n; DBDestroy(); return false; } #Get no of rows in recordset if (!$DBQryRows=(odbc_num_rows($DBQryId) or die(Database Execution Error: . odbc_Error() . . odbc_ErrorMsg( { echo \nError executing database request: [ODBC_NUM_ROWS]\n; DBDestroy(); return false; } #Get number of fields to display if (!$DBQryColumns=(odbc_num_fields($DBQryId) or die(Database Execution Error: . odbc_Error() . . odbc_ErrorMsg( { echo \nError executing database request: [ODBC_NUM_FIELDS]\n; DBDestroy(); return false; } return true; } Does this look ok to you more experienced guys? Am I missing something or is there a better way? Thanks. Colum Mail2Web - Check your email from the web at http://www.mail2web.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] Mail2Web - Check your email from the web at http://www.mail2web.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] sql problem
A quick glance suggests to me that it is a nonstandard proprietary extension to SQL that provides a way to set a kind of a variable and use it in a subsequent nonstandard proprietary SQL-looking statement that is awfully procedural. You'll probably want to either consult the documentation for the RDBMS you use or ask your question on a mailing list tailored to users and/or developers of the RDBMS you're using for a definitive answer. I can verify for you that it's not standard SQL, though. And it looks to me like they've gone and made what appears to be an extension that extends SQL so it has some procedural capabilities. There are problems on many levels with using SQL as a procedural language. The most obvious problem with using nonstandard proprietary procedural extensions to SQL is that (for example) you couldn't change backend database without recoding all your nonstandard SQL-looking statements. But I suppose they can be helpful because you couldn't possibly do the same thing with PHP (or perl, or a C program, or...) and standard SQL. Oh, wait. You can do procedural things with de-facto standard and standard procedural languages? Well, I'm sure there's a reason to have nonstandard proprietary extensions that add procedural capabilities to SQL or they wouldn't have them. (Note the clever way I mentioned PHP, since this is a PHP mailing list and both the question and the answer have nothing to do with PHP. It still doesn't bring it on topic, but at least I tried.) Doug At 11:54 AM 6/26/01 +0800, Fai wrote: SELECT @A:=SUM(salary) FROM table1 WHERE type=1; UPDATE table2 SET summmary=@A WHERE type=1; What does @A: mean? Thank you very much! -- 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] Dbase function problem
- Original Message - From: Bartek Pawlik To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 7:08 AM Subject: Dbase function Hi My problem is I have dbf file, I get one record, one of the record's filed is binary (32 bits). The function dbase_get_record cut Least Sagnificant Bit from this file, I of course I get wrong value. Can anyone help me? Is there sth wrong with function? Thax in advance Bartek -- Jedzisz konno? Ten konkurs jest dla Ciebie! [ http://konkursy.onet.pl/emarket2/ ]
Re: [PHP-DB] SELECT with ibase_prepare/ibase_execute possible?
Hi Yes it is possible I'm using it currentlyon some of my major qry's You'd prepare the qry and the instead of using the ibase_query just use the ibase_execute in the same way Niel Arne Borkowski (borko.net) [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Hi, I can use ibase_prepare/ibase_execute with an UPDATE statement. Okay. Could I use it for SELECT either? It does not seem to, however, I am curious to know if at all and if so how. Cheers, Arne -- 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] managing variant data
I would create another table called extras that include all possible extra choices. This table has a SpeciesID field to assign it to a species. A third table called details could have OfficerID and ExtrasID and ExtrasValue fields. That way you could have as many or as few extras as you want. Filling out the data requires two forms. The first just gets the basic officer info. The second grabs the officerID and Species and displays only those Extras that pertain to that species. Submitting the info populates the details table. Queries link the officer details tables on OfficerID. You can link the extras details tables on the ExtrasID when you need. kind regards, bill hollett Jesse Scott wrote: Hi again, another conundrum. What is the best way to deal with the following situation? You have a group of common properties including a property that indicates a second group of common properties. For example, suppose you have this table: Officers Name Rank Age Height Weight Species The 'Species' property may have the following values: Vulcan, Human, Klingon, or Android. If (Species==Vulcan) then you want to store these additional properties: MindmeldCount and YearsOnVulcan If (Species==Klingon) then you want to store these additional properties: NumberofConcealedWeapons and RidgesOnForehead If (Species==Android) then you want to store these additional properties: PositronicBrain and MemoryJigas If (Species==Human) then you want to store these additional properties: AttendedStarfleetAcademy and BloodType The problems I want to avoid are: 1) placing all the properties for all species in the Officers table (as this would include unnecessary properties for each row) and 2) storing the properties in the Officers in four seperate tables (Klingons, Humans, Androids, and Vulcans) redundantly. Should additional tables be created: Vulcans, Klingons, Androids, Humans? If so, how should these tables be joined to Officers? In an object language I would solve a problem like this be creating a base class with the Officers properties and then deriving new classes from this base class using inheritance. How do I solve this problem in a database setting? Thanks in advance for your help, Jesse -- 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] Is MySQL in 4.0.6?
-Original Message- From: Adam Lundrigan [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 5:46 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Is MySQL in 4.0.6? Is MySQL included in the 406kb version of PHP 4.0.6? When I try to connect to MySQL (after adding localhost paswords to php.ini) using this version it says: Warning: Can't connect to MySQL server on 'localhost' (10061) in mysql_local_test.php on line 2 If that's the message you're getting, that would indicate to me that (1) your copy of PHP *does* include the MySQL client functionality, and (2) it isn't successfully connecting to a MySQL server. From what i've heard, MySQL is included in PHPbut why doesn't the connect work if it is included? Do you actually have a MySQL server running? --- Mark Roedel ([EMAIL PROTECTED]) || There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full. LeTourneau University ||-- Henry Kissinger -- 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] Truncated text fields stored into SQLServer
We are having a problems storing long text strings sent with HTML forms into sqlserver through ODBC (mssql native support doesn't work for us). We've defined tables with 16 bit text fields but the strings always become truncated at 4Kb or so when we store it. Thanks in advance: Raúl. -- 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] 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
Re: [PHP-DB] Database access using ODBC
Colum, Did you try it, stripping out all of your error testing code, just doing a simple query, such as a Select * from tablename? You could also try searching the archives of the list for these two names: Andrew Hill, who works for OpenLink, a company which builds ODBC drivers. and Manuel Lemos who has developed what I believe is a fairly decent class of database objects. My problem is that I have no experience using ODBC within PHP, so I don't have any direct hints except to divide and conquer. In other words, if you are getting a connection, then try a simple query, making certain, by echoing it, that it looks OK. Check the error that's thrown and diagnose from there. Have you tried odbc_connect? Have you checked all the comments in the online manual against what you're doing? (I know that sounds like hectoring, but I once made a 180 mile round trip service call because I was too stubborn to check a piece of network cable.) :( One thing I am certain of, the fix, when you find it, will probably be trivial. Keep plugging, dividing and conquering - Miles At 05:52 AM 6/26/01 -0400, [EMAIL PROTECTED] wrote: Thanks for the reply. When it didn't work, I downloaded and installed the mdac 2.6 and the up to date jet service pack. Still no joy. $DBConn is coming back as integer 1 so that seems ok. I have tested the DSN using MSQuery and it is connecting ok. I have also turned tracing on for the dsn and the trace says that it connects successfully but then nothing else. I am a bit lost after this. Anyone any suggestions? Thanks, Colum Original Message: - From: [EMAIL PROTECTED] (Miles Thompson) Date: Mon, 25 Jun 2001 18:22:52 -0300 To: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [PHP-DB] Database access using ODBC Colum, Did you check out www.php.net/odbc_Exec One of the solutions posted in the comments was to download and install a new ODBC driver from MSFT. Are you getting a valid integer returned to $DBConn? NOt worked with this, but I hope those are helpful suggestions - Miles Thompson At 08:38 AM 6/25/01 -0400, [EMAIL PROTECTED] wrote: Hi, Long time reader, first time poster! I am new to php coming from a generally MS (unfortunately) background (Access, VB, SQLServer) and I am looking to branch out a bit. I have a client who wishes to have an internet front-end to an Access database. I am using php with odbc to access this and (as I am a newbie), I am having problems with the connection. After I do an odbc_pConnect, when I call the odbc_exec, I get the usual error, Warning: Supplied agrument is not a valid ODBC-Link resource. The ODBC DSN is setup as standard (no default login etc). The following code is being used for db access: function DBRetrieve($pSQLStr) { global $DBConn, $DBQryID, $DBQryRows, $DBQryColumns; $DBDsn='PHPTEST'; $DBUser='Admin'; $DBPassword =''; #Open a persistent connection to the database if (!$DBConn = (odbc_pConnect($DBDsn, $DBUser, $DBPassword) or die(Database Execution Error: . odbc_Error() . . odbc_ErrorMsg( { echo \nError connecting to database\n; return false; } #Send query to database if (!$DBQryID=(odbc_Exec($DBConn, $pSQLStr) or die(Database Execution Error: . odbc_Error() . . odbc_ErrorMsg( { echo \nError executing database request: [ODBC_EXEC]\n; DBDestroy(); return false; } #Get no of rows in recordset if (!$DBQryRows=(odbc_num_rows($DBQryId) or die(Database Execution Error: . odbc_Error() . . odbc_ErrorMsg( { echo \nError executing database request: [ODBC_NUM_ROWS]\n; DBDestroy(); return false; } #Get number of fields to display if (!$DBQryColumns=(odbc_num_fields($DBQryId) or die(Database Execution Error: . odbc_Error() . . odbc_ErrorMsg( { echo \nError executing database request: [ODBC_NUM_FIELDS]\n; DBDestroy(); return false; } return true; } Does this look ok to you more experienced guys? Am I missing something or is there a better way? Thanks. Colum Mail2Web - Check your email from the web at http://www.mail2web.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] Mail2Web - Check your email from the web at http://www.mail2web.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] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
RE: [PHP-DB] Oracle and PHP
TathitSA, You'll need to have the Oracle networking software (Net8) installed on your Web server. Then, compile PHP with the Oracle directive turned on. These are just general concepts, but if this is incomprehensible, then please ask more questions before proceeding. For more details, see the installation manual , and if you don't understand what they say, ask a more specific question. I'll be happy to help translate whatever I can. Anthony -Original Message- From: TathitSA [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 1:47 AM To: PHP General; PHP DB Subject: [PHP-DB] Oracle and PHP Hi, I'm a newbie in PHP, what should I do to connect to Oracle Database. Do I have to install a library to do that? Please anyone, help. Thanks, TathitSA -- 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 Client to connect to remote DB
Jeff, When you run the graphical Oracle Installer program (require X-Windows), you can choose a custom installation and specify what you want to install. I don't know if you can get just the client for Linux, but the server software includes the client software. You can demo the software from technet.oracle.com. I have no idea how much it costs by itself. Anthony -Original Message- From: Mindblender [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 12:35 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Oracle Client to connect to remote DB I read a post on faqt.com that said that I could connect to a remote Oracle DB if I had the Oracle client installed. Does anyone know where I can get a copy of only the client for Linux? I don't want to install the whole Oracle package, I use MySQL on the server, but have a client that is needing to connect to an Oracle DB on their server from mine. Any suggestions? Thanks, Jeff -- 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] Oracle Client to connect to remote DB
Jeff, As far as I know, you cannot get *only* the Oracle client for Linux. When I called Oracle Worldwide Support and asked for one, they sent me the whole Oracle 8i installation package for Linux. No problem, though -- when you start the install on your Linux machine, you can choose to install only the client. That's what I did, and it's working fine connecting to the Oracle 8i database on our Sun. -Original Message- From: Mindblender [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 12:35 AM To: [EMAIL PROTECTED] Subject:[PHP-DB] Oracle Client to connect to remote DB I read a post on faqt.com that said that I could connect to a remote Oracle DB if I had the Oracle client installed. Does anyone know where I can get a copy of only the client for Linux? I don't want to install the whole Oracle package, I use MySQL on the server, but have a client that is needing to connect to an Oracle DB on their server from mine. Any suggestions? Thanks, Jeff - Brian S. Dunworth Sr. Software Development Engineer Oracle Database Administrator The Printing House, Ltd. (850) 875-1500 x225 [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] Extracting data from html files into csv
hi all, I have a huge project coming up today where I need to extract a large number of entries from a directory. What I would like to do is use a site ripper [to download each properties HTML file to a local directory on my pc] and then run some sort of extraction on the file to create an excel, or delimited file. 1. All entries have the same basic format 2. Not all fields are present for each Does anyone know of a program to strip this type of data into a xls or cvs file? thanks much, olinux _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.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] Cookies
this doesnt work :echo $HTTP_COOKIE_VARS[nameCookie] code to set cookie: setcookie(newsLogin,$value,time()+ 3348000); if i ask from the same page I get the values I need but not from a different page... You are asking the wrong variable name. If you set a cookie variable named newsLogin, you have to query it with $HTTP_COOKIE_VARS[newLogin], or, if you enabled track_vars, you can simply do it by $newsLogin. PHP gives you all cookie, post and get variables as global variables in your scripts. Kristian -- 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
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-DB] stdin
Hi, what is the following? php://stdin Thanx, Vipin. _ Buy Lagaan Yaadein music for 30% less. Avail this special offer at http://shopping.rediff.com/shopping/music/offerrediffmailer.htm -- 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] session_end()
Okay, but what I want to do is use session_end(). session_destroy() destroys the session, while session_end() actually writes the sesstion and ends it :-). this is achievecd when the script is done, but you have to exit your browser. Thanks for the help, I think I'll just serialize() it. Chadwick Rolfs On Sat, 23 Jun 2001, olinux wrote: try session_destroy() olinux -Original Message- From: Chadwick Rolfs [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 23, 2001 12:39 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] session_end() dear list I have attempted to use session end to no avail. I have a self-referencing form with a button, that when checked and sent, calls session_end(). I get a call to undefined function error. Does there need to be something compiled into the php module? Everything else seems to work with sessions, so I don't know why session_end() wouldn't work. its PHP Version 4.0.3pl1 on a cobalt raq4 server. code snippet..(the code seems to work, but I get that above error.) _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.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] -- 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]