[PHP-DB] ORA-01460 error when useing bind sql on oracle from php

2003-11-20 Thread Are Pedersen
I get ORA-01460: unimplemented or unreasonable conversion requested when useing bind-sql on Oracle 9i. I am useing OCI 8.1 client in PHP. What is wrong? And what does this message mean? Here is the code: ---***--- $bindarray1=array(':project1'=$project); $bindarray1[':userid']=$userid; $rs =

[PHP-DB] Re: ORA-01460 error when useing bind sql on oracle from php

2003-11-20 Thread Are Pedersen
Sorry about replying to my own posts, but... Problem solved! As OCIBindByName is binding to the actual variable, that variable must not be changed. I modified my script to look like this: ---***--- $ci=0; foreach ($bindargs as $bindname = $bindvalue){ ${bindval$ci}=$bindvalue;

[PHP-DB] Parse error on array and SQL query

2003-11-20 Thread Dillon, John
On line 188 and similar: line 187$this=$altIDs[$i]; line 188$query .= ID='$this'; I get the error: Parse error: parse error in /home/jdillon/public_html/provreport.php on line 188 Could this be because some setting has been changed on my shared

[PHP-DB] nested sets?

2003-11-20 Thread ma
hi everybody! i try to make a clickable menu. it should be outputed as XML. i found a solution to make it possible to decend only the selected menues. but is there a easier solution? my goal is to first show only the first (level=0) level. if the user clicks on the menu it should select the

[PHP-DB] Linux/PHP with M$/SQL Server

2003-11-20 Thread Matt Giddings
Has anybody been able to bridge a Linux/php setup to a M$/SQL Server database? Is this possible using JDBC or a Unix ODBC connection to the SQL Server? Any pointers in the right direction would be greatly appreciated. Thanks, Matt -- PHP Database Mailing List (http://www.php.net/) To

RE: [PHP-DB] Parse error on array and SQL query

2003-11-20 Thread Hutchins, Richard
Speaking for myself only, I'm probably going to need to see more code than this to be able to help. These two lines appear to be OK. The error might be in what feeds line 187. -Original Message- From: Dillon, John [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 9:16 AM To:

Re: [PHP-DB] Linux/PHP with M$/SQL Server

2003-11-20 Thread jeffrey_n_Dyke
you can use freetds (http://freetds.org) i think there is even an rpm... Then you just use the mssql_* functions built into php hth Jeff

[PHP-DB] Re: Linux/PHP with M$/SQL Server

2003-11-20 Thread pete M
I use PEAR db which is included wit the php distribution http://pear.php.net/manual/en/package.database.php http://vulcanonet.com/soft/?pack=pear_tut pete Matt Giddings wrote: Has anybody been able to bridge a Linux/php setup to a M$/SQL Server database? Is this possible using JDBC or a Unix

Re: [PHP-DB] Linux/PHP with M$/SQL Server

2003-11-20 Thread Matt Giddings
Thanks Jeff, I'll look into FreeTDS. Matt [EMAIL PROTECTED] wrote: you can use freetds (http://freetds.org) i think there is even an rpm... Then you just use the mssql_* functions built into php hth Jeff

Re: [PHP-DB] Linux/PHP with M$/SQL Server

2003-11-20 Thread Frank M. Kromann
Hi, It is also described in the documentation at http://php.net/mssql. - Frank Thanks Jeff, I'll look into FreeTDS. Matt [EMAIL PROTECTED] wrote: you can use freetds (http://freetds.org) i think there is even an rpm... Then you just use the mssql_* functions built into php hth

Re: [PHP-DB] Linux/PHP with M$/SQL Server

2003-11-20 Thread Matt Giddings
Doh! RTFM. : ) You caught me.. Matt Frank M. Kromann wrote: Hi, It is also described in the documentation at http://php.net/mssql. - Frank Thanks Jeff, I'll look into FreeTDS. Matt [EMAIL PROTECTED] wrote: you can use freetds (http://freetds.org) i think there is even an

RE: [PHP-DB] Parse error on array and SQL query

2003-11-20 Thread Dillon, John
My host provider suggested escaping the SQL: $query .= ID=\'$this\'; which gets rid of the php error but gives invalid SQL. After a few exchanges with them it suddenly worked again as: $query .= ID='$this';. -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED] Sent: 20

[PHP-DB] how obtain last id past insert?

2003-11-20 Thread Webmaster D.G.R.E.R.
Hi: How i obtain inmediatly the id of last insert ? For example i have a forum, when the user post a question, i send a mail to administrator, but i want to refer the id from this insert, how i do this ? Well i think to make a select max(id) inmediatly but i beliebe that must have any

Re: [PHP-DB] how obtain last id past insert?

2003-11-20 Thread jeffrey_n_Dyke
if you're using mysql php.net/mysql_insert_id if you're not, there may be a variant for you db hth Jeff Webmaster

[PHP-DB] Re: Subject: Hitcounter works on production server but not on localhost

2003-11-20 Thread Neil Smth
Its not a permissions thing. You need to ensure that you provide PHP with a full path to the hit counter file : countrerlog.txt is a relative path. c:\\Inetpub\\wwwroot\\WCBE\\countrterlog.txt is a full path. You need to do the same with the relative path to FX_DataCounter/wcbecounter.txt as

Re: [PHP-DB] Parse error on array and SQL query

2003-11-20 Thread John W. Holmes
Dillon, John wrote: On line 188 and similar: line 187 $this=$altIDs[$i]; line 188 $query .= ID='$this'; I get the error: Parse error: parse error in /home/jdillon/public_html/provreport.php on line 188 Could this be because some setting has been changed on my shared host? $this is normally

Re: [PHP-DB] how obtain last id past insert?

2003-11-20 Thread John W. Holmes
Webmaster D.G.R.E.R. wrote: Hi: How i obtain inmediatly the id of last insert ? For example i have a forum, when the user post a question, i send a mail to administrator, but i want to refer the id from this insert, how i do this ? Well i think to make a select max(id) inmediatly but

[PHP-DB] RE: Subject: Hitcounter works on production server but not on localhost

2003-11-20 Thread Paul Ihrig
hey niel. thanks man... thats wierd, why does it need to be full? how would i have been able to figure that out? appreciate it.. -Original Message- From: Neil Smth [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2003 12:53 PM To: Cc: [EMAIL PROTECTED] Subject: Re: Subject:

Re: Re: [PHP-DB] Read file

2003-11-20 Thread Neil Smth
OK Error in my last post, the mail reader munged the HTML so if you need as source use the XML data below and hopefully the text below will appear as html code ;-) Cheers - Neil lt;htmlgt; lt;headgt; lt;titlegt;Demo Hotel Loaderlt;/titlegt; lt;/headgt; lt;body

RE: [PHP-DB] Parse error on array and SQL query

2003-11-20 Thread Dillon, John
Dillon, John wrote: On line 188 and similar: line 187$this=$altIDs[$i]; line 188$query .= ID='$this'; I get the error: Parse error: parse error in /home/jdillon/public_html/provreport.php on line 188 Could this be because some setting has

Re: [PHP-DB] Parse error on array and SQL query

2003-11-20 Thread John W. Holmes
Dillon, John wrote: Tried that, doesn't work with: $query=INSERT INTO ReplyTbl VALUES (' . $monster1 . ', ' . $monster2 . ', ' . $monster3 . ', NULL, NULL); Don't suppose they use 'monster' as a reserved word... How does it not work again?? -- ---John Holmes... Amazon Wishlist:

Re: [PHP-DB] how obtain last id past insert?

2003-11-20 Thread pete M
depends which DB your using in mysql its select last_insert_id() and in mssql for example its select @identity have fun Pete Webmaster D.G.R.E.R. wrote: Hi: How i obtain inmediatly the id of last insert ? For example i have a forum, when the user post a question, i send a mail to

RE: [PHP-DB] Parse error on array and SQL query

2003-11-20 Thread Hutchins, Richard
If you're not getting the parse error anymore, I'd suggest you echo $query to the browser and check to see that the SQL statement is what you expect it to be. Can't count the number of times doing that has pointed out some stray apostrophe or comma or something that killed the query.

[PHP-DB] Can't connect to local MySQL

2003-11-20 Thread Jose
$link = mysql_pconnect(localhost, bm_user, password) or die(Could not connect : . mysql_error()); Return : Could not connect : Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) If I run shellmysql -h localhost -u bm_user -ppassword Welcome to the MySQL

[PHP-DB] MySQL and PHP

2003-11-20 Thread Jose
I'm trying to work with MySQL 4.0.16-standard and PHP php-4.3.4 I'm getting the folowing error: Fatal error: Call to undefined function: mysql_pconnect() in /var/www/html/db_fns.php on line 5 Any Ideas what I am missing in the configuration. If I run phpinfo() I get: System Linux

[PHP-DB] Unsure of how to perform query and results..

2003-11-20 Thread Aaron Wolski
Hi Guys, I have data in a Db that looks something like: 14,[EMAIL PROTECTED],Andrew,Smith 1,[EMAIL PROTECTED],Andrew,Smith 14,[EMAIL PROTECTED],Barbara,Richardson 1,[EMAIL PROTECTED],Barbara,Richardson The number represents a product_id that was purchased by the customer in question. As you

[PHP-DB] MySQL and PHP

2003-11-20 Thread Jose
I'm trying to connect to a MySQL database. I'm able to do it from mysql, I can see my databases and tables. When I try to see it from php I get the error: Fatal error: Call to undefined function: mysql_connect() in /var/www/html/test2.php on line 3 What I'm missing in the configuration? When

[PHP-DB] mysql table join

2003-11-20 Thread Roger Miranda (Sumac)
Hey everyone.. Is there a way to permanently join/link two mysql tables? Thanks, Roger -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Access db

2003-11-20 Thread Michael Mauch
Luke Van Blerk wrote: I'll probably just extract the data with an access to mysql script and run it on mysql. This is probably the best approach if you have access to Windows machine. If not, http://freshmeat.net/projects/mdbtools/ might help. Regards... Michael -- PHP

Re: [PHP-DB] mysql table join

2003-11-20 Thread CPT John W. Holmes
From: Roger Miranda (Sumac) [EMAIL PROTECTED] Is there a way to permanently join/link two mysql tables? Not without creating another table. CREATE TABLE MyTable SELECT ... FROM Table1 JOIN Table2 ON ... WHERE ... Although I have to wonder about your schema if you need to do this. ---John

Re: [PHP-DB] Unsure of how to perform query and results..

2003-11-20 Thread CPT John W. Holmes
From: Aaron Wolski [EMAIL PROTECTED] I have data in a Db that looks something like: 14,[EMAIL PROTECTED],Andrew,Smith 1,[EMAIL PROTECTED],Andrew,Smith 14,[EMAIL PROTECTED],Barbara,Richardson 1,[EMAIL PROTECTED],Barbara,Richardson The number represents a product_id that was purchased by

Re: [PHP-DB] Read file

2003-11-20 Thread Ng Hwee Hwee
hi neil, this is indeed a very helpful piece of code and advice.. thank you so much! if this took you 30 minutes to write, it would have taken me a day to learn XML, and start writing! this code looks complicated for a young programmer like me ;p.. i'll need time to read up on XML and get back to

[PHP-DB] Strange bahavior with mysql_fetch_array($result)

2003-11-20 Thread Evan Panagiotopoulos
I am searching a table and have the following php code with my comments: $result = mysql_query($query); print The result == $result; // it returns The result == Resource id #2 if (!mysql_fetch_array($result)) { ... } else { while ($row = mysql_fetch_array($result)) { ... } } Neither

Re: [PHP-DB] Strange bahavior with mysql_fetch_array($result)

2003-11-20 Thread Gerard Samuel
On Thursday 20 November 2003 08:54 pm, Evan Panagiotopoulos wrote: I am searching a table and have the following php code with my comments: $result = mysql_query($query); print The result == $result; // it returns The result == Resource id #2 if (!mysql_fetch_array($result)) { ... } else

[PHP-DB] Re: Strange bahavior with mysql_fetch_array($result)

2003-11-20 Thread Kirk Babb
Hi Evan, Try something like this instead: $query = mysql_query(SELECT product_id, product_name, purchase_date from MyTable ORDER BY product_id DESC); if(!$query) { echo mysql_errno() . : . mysql_error() . \n; die; } else { //Now, for fun, display the results in a table with the results

Re: [PHP-DB] Strange bahavior with mysql_fetch_array($result)

2003-11-20 Thread Shahmat Dahlan
What of the sql statement? If your sql statement had mistakes in it (be it typo, or wrongly constructed statements), it will not even execute the if (!mysql_fetch_array($result)) { } portion of your code. You might want to construct your error checking portion differently as opposed to

[PHP-DB] SQLite

2003-11-20 Thread Bronislav Kluka
Hi, I was trying to work with SQLite, everything is OK, but it seems not to vork in thread, but in sequences. I mean: I perform a question which tooks 2 minutes, then another, which tooks 3 minutes, then I perform them both from 2 separated browser windows and both of them stops at the same time