[PHP-DB] Informix
Hello, Does any one know how to connect to Informix database on a Different server?? I have searched on google, php.net but couldn't get a details guide on what to set. the ifx_connect() does not give me an option to pass in the database server ip. Do I need to set it somewhere else?? Foong -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] db connect probs
do you have any idea why the following(line 106)would return the following error message ? the login.php has an included form to create an account and that is what will not connect. $connection = mysql_connect($host, $user,$password) //this is line 106 Warning: Access denied for user: 'x,@host' (Using password: YES) in /users/infoserv/web/register/login.php on line 106 Warning: MySQL Connection Failed: Access denied for user: 'x,@host' (Using password: YES) in /users/infoserv/web/register/login.php on line 106 Couldn't connect to server. You can take this one at face value: that combination of username, password, and host does not have permission from MySQL to access the database. First, verify what information is being used to connect. Then, if you can, confirm these values by logging into MySQL another way (e.g., through the mysql client). If you just added these permissions, be sure to reload the permissions before logging in. Larry -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] db connect probs
hello, do you have any idea why the following(line 106)would return the following error message ? the login.php has an included form to create an account and that is what will not connect. $connection = mysql_connect($host, $user,$password) //this is line 106 Warning: Access denied for user: 'x,@host' (Using password: YES) in /users/infoserv/web/register/login.php on line 106 Warning: MySQL Connection Failed: Access denied for user: 'x,@host' (Using password: YES) in /users/infoserv/web/register/login.php on line 106 Couldn't connect to server. my required file is as follows: $user="$email,$femail"; $host="$hostname"; $password="password('$password'),password('$fpassword')"; $database="$classes"; ?> thank you again for your time. addison -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 [EMAIL PROTECTED] [EMAIL PROTECTED] subsidiaries of small independent publishing co. [EMAIL PROTECTED] [EMAIL PROTECTED]
Re: [PHP-DB] error message print
echo "$message_new"; Is that what you wanted? - Original Message - From: "Addison Ellis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 14, 2003 5:01 PM Subject: [PHP-DB] error message print > hello, > how can i get an error message to print in the color red as > in the code below? > thank you for your time, addison > $message_new = "$zip is not a valid zip code. > Please try again."; > -- > Addison Ellis > small independent publishing co. > 114 B 29th Avenue North > Nashville, TN 37203 > (615) 321-1791 > [EMAIL PROTECTED] > [EMAIL PROTECTED] > subsidiaries of small independent publishing co. > [EMAIL PROTECTED] > [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] error message print
hello, how can i get an error message to print in the color red as in the code below? thank you for your time, addison $message_new = "$zip is not a valid zip code. Please try again."; -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 [EMAIL PROTECTED] [EMAIL PROTECTED] subsidiaries of small independent publishing co. [EMAIL PROTECTED] [EMAIL PROTECTED]
RE: [PHP-DB] ldap_search in 4.3
Well, I discovered that the php_ldap extension released with 4.2.3 works fine with php 4.3 ... so I'm mostly upgraded. :-) however, I'd still like to have the new extension work. Let me know if anyone finds anything. <>< Ryan -Original Message- From: Ryan Jameson (USA) Sent: Tuesday, January 14, 2003 4:52 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] ldap_search in 4.3 Weirdness I just started using PHP 4.3 and something strange is happening with my ldap_search calls. It isn't working like it used to. Anyone have any ideas? When I revert to 4.2.3 it works fine. <>< Ryan Ryan Jameson Software Development Services Manager International Bible Society W (719) 867-2692 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] ldap_search in 4.3
Weirdness I just started using PHP 4.3 and something strange is happening with my ldap_search calls. It isn't working like it used to. Anyone have any ideas? When I revert to 4.2.3 it works fine. <>< Ryan Ryan Jameson Software Development Services Manager International Bible Society W (719) 867-2692 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Arrays and forms
On Wednesday 15 January 2003 03:23, Mignon Hunter wrote: > Hello list, > > I submitted this problem earlier but got no response so I thought I'd > elaborate. > > The code below successfully displays all of the problems from the db. > Based on what is chosen here, needs to go into another table in the db > along with a customer tracking id. > > for($knt = 0;$row = mysql_fetch_row($res3); $knt++) > { > $cat_detail = $row[0]; > echo " \"$cat_detail\"> $cat_detail " > ." Highvalue=\"1\">" > ." Medvalue=\"2\">" > ." Lowvalue=\"3\">" > ." Yes > "; > } > > When this page is submitted, I can successfully capture $prob[] - but I > am having no luck in pulling the corresponding $level[] (if one was > checked). So my form - once submitted - may look like: > > Problem one (no priority picked) > Problem two High priority > Problem three Low priority > > My $prob[] would be: My $level[] would be: > > $prob[0]: Problem one $level[0]: High > $prob[1]: Problem two $level[1]: Low > $prob[2]: Problem three > > So as you can see my second problem does not correctly correspond to the > correct priority. The first (or all) element(s) in the level array may > be null. The reason is that: 1) unchecked checkboxes do not make it into php 2) because you're not specifying an index for the array (level[]), php will create it for you automatically So instead of using just name="level[]" specify the level explicitly: name="level[0]", name="level[1]", etc NB you should do the same for prob[] as well. Having done that then in your example you should get something like: $prob[0]: Problem one $prob[1]: Problem two $level[1]: High $prob[2]: Problem three$level[2]: Low NB that $level[0] is undefined. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Harp not on that string. -- William Shakespeare, "Henry VI" */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Arrays and forms
Hello list, I submitted this problem earlier but got no response so I thought I'd elaborate. The code below successfully displays all of the problems from the db. Based on what is chosen here, needs to go into another table in the db along with a customer tracking id. for($knt = 0;$row = mysql_fetch_row($res3); $knt++) { $cat_detail = $row[0]; echo " $cat_detail " ." High " ." Med " ." Low " ." Yes "; } When this page is submitted, I can successfully capture $prob[] - but I am having no luck in pulling the corresponding $level[] (if one was checked). So my form - once submitted - may look like: Problem one (no priority picked) Problem two High priority Problem three Low priority My $prob[] would be:My $level[] would be: $prob[0]: Problem one $level[0]: High $prob[1]: Problem two $level[1]: Low $prob[2]: Problem three So as you can see my second problem does not correctly correspond to the correct priority. The first (or all) element(s) in the level array may be null. I have read up on and tried some associative arrays but no luck in utilizing them within a form; been trying all sorts of testing, books, web tuts, etc. but still come up with the same problem. Also in case anyone were to suggest sessions, my supervisor is adamently opposed to using them on this site, not sure why, not even sure if that would make my life easier or not since I've never used them. Any comments (good, bad, indifferent) here would be most appreciated. Any suggestions as to other ways of doing this also appreciated. Many thanks Mignon -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] MySQL problem with RedHat 8
Hi! I'm trying to connect to my mysql database using something like mysql_connect( 'localhost', 'root', 'thepassword' ) or die ( 'Unable to connect to server.' ); But I get the error message: Fatal error: Call to undefined function: mysql_connect() in /home/daniel/public_html/index.php on line 21 I have: [root@p85 /]# rpm -qa |grep sql php-mysql-4.2.2-8.0.5 mysql-3.23.52-3 mysql-server-3.23.52-3 mysql-devel-3.23.52-3 and: [root@p85 /]# rpm -q php php-4.2.2-8.0.5 Someone mentioned these two settings in php.ini, which I tried with no success: register_globals = On short_open_tag = On phpinfo() says that php was compiled with '--with-mysql=shared,/usr' Can someone help me please? regards, -- Daniel Elenius <[EMAIL PROTECTED]> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] LEFT JOIN not working
For a start simplify the query, so that you are returning only one field until you get it right, say ads_displayrate.name. Second, echo the SQL statement so you can see what has been generated. Third, check the datatypes returned for YEAR(), MOTN() and DAYOFMONTH() functions in MySQL. As part of your diagnosis you may want to include the generated output from these functions so you see what they are returning. Fourth, if you have access to the MySQL console, try this interactively. HTH - Miles Thompson At 07:46 PM 1/14/2003 +0200, Lisi wrote: Still not working. I made the change, and I'm still getting all results. I even tried it without the leading '0' in front of the 1, no good. Here's my current query, with suggested changes: SELECT ads_displayrate.name, SUM(ads_displayrate.count) as display, SUM( IF( ads_clickrate.date IS NULL, 0, 1 ) ) as click FROM ads_displayrate LEFT JOIN ads_clickrate ON ads_displayrate.name = ads_clickrate.name AND YEAR(ads_displayrate.date) = '2003' AND MONTH(ads_displayrate.date) = '01' AND DAYOFMONTH(ads_displayrate.date) = '05' GROUP BY ads_displayrate.name ORDER BY ads_displayrate.name ads_displayrate.date is a column of date type, so as far as I understand this should work. Is there some typo I'm missing? At 07:15 PM 1/9/03 +0100, you wrote: Oops! I missed again. If you specify conditions pertaining to the right-hand table, such as: ads_clickrate.date = '2001', Then you will lose all result rows for which the right-hand data is NULL. Not the expected result. So your restricting WHERE clauses must apply to the left-hand table only. Therefore: WHERE YEAR(ads_displayrate.date) = '2003' AND MONTH(ads_displayrate.date) = '01' (if your table ads_displayrate has such date fields). HTH Ignatius - Original Message - From: "Lisi" <[EMAIL PROTECTED]> To: "Ignatius Reilly" <[EMAIL PROTECTED]> Sent: Thursday, January 09, 2003 6:54 PM Subject: Re: [PHP-DB] LEFT JOIN not working > Cool! It's mostly working now, the only problem is it's ignoring the other > clauses in the ON clause that select the desired date. Perhaps it's not > supposed to be connected this way? How would I select specific dates? > > Thanks again, > > -Lisi > > At 01:20 PM 1/9/03 +0100, you wrote: > >Oops! Sorry, I missed it the first time. > > > >Your query should start as: > >SELECT ads_displayrate.name > >instead of > >SELECT ads_clickrate.name > > > >then you will always have a non-NULL name (coming from the table on the left > >of the LEFT JOIN). > > > >HTH > >Ignatius, from Brussels > > > >"Where the fuck is Belgium?" > >D. Ivester, CEO, Coca Cola > > > > > >- Original Message - > >From: "Lisi" <[EMAIL PROTECTED]> > >To: "Ignatius Reilly" <[EMAIL PROTECTED]>; "PHP-DB" > ><[EMAIL PROTECTED]> > >Sent: Thursday, January 09, 2003 1:11 PM > >Subject: Re: [PHP-DB] LEFT JOIN not working > > > > > > > Exactly my question - why does it not have a name? How would I modify my > > > query to get a row with a name but null value for date? I thought the join > > > would take care of this, but I'm obviously not doing it right. > > > > > > You mention a unique identifier, there is a separate table with a row for > > > each ad, containing name, URL, and a unique ID number (autoincrement). > > > Should this table be included somehow in the query? How would this help? > > > > > > Thanks, > > > > > > -Lisi > > > > > > At 12:45 PM 1/9/03 +0100, Ignatius Reilly wrote: > > > >Your 4th row ought to have an identifier of some sort. From your SELECT > > > >statement, this seems to be the name. Why does it not have a name? > >Probably > > > >what you want is a row with a name but a NULL value for > >ads_clickrate.date. > > > > > > > >(by the way it is EXTREMELY advisable to use an abstract identifier, such > >as > > > >an id, unique and required, instead of "name") > > > > > > > >Ignatius > > > > > > > >- Original Message - > > > >From: "Lisi" <[EMAIL PROTECTED]> > > > >To: "Ignatius Reilly" <[EMAIL PROTECTED]>; "PHP-DB" > > > ><[EMAIL PROTECTED]> > > > >Sent: Thursday, January 09, 2003 12:18 PM > > > >Subject: Re: [PHP-DB] LEFT JOIN not working > > > > > > > > > > > > > OK, this helped a bit. Now I have, in addition to the three rows of > >ads > > > > > that have ben clicked on, a fourth row with no ad name, 0 > >clickthroughs, > > > > > and 24 displays. That plus the other three account for all the > >displayed > > > >ads. > > > > > > > > > > However, since it is returning a null value for any ad name that has > >not > > > > > been clicked on, and then it's grouped by ad name, it lumps all > > > >non-clicked > > > > > ads into one row. What I need is to see each ad on a separate row, > >which > > > >is > > > > > what I thought a LEFT JOIN was supposed to do. > > > > > > > > > > Any suggestions? > > > > > > > > > > Thanks, > > > > > > > > > > -Lisi > > > > >
Re: [PHP-DB] LEFT JOIN not working
Still not working. I made the change, and I'm still getting all results. I even tried it without the leading '0' in front of the 1, no good. Here's my current query, with suggested changes: SELECT ads_displayrate.name, SUM(ads_displayrate.count) as display, SUM( IF( ads_clickrate.date IS NULL, 0, 1 ) ) as click FROM ads_displayrate LEFT JOIN ads_clickrate ON ads_displayrate.name = ads_clickrate.name AND YEAR(ads_displayrate.date) = '2003' AND MONTH(ads_displayrate.date) = '01' AND DAYOFMONTH(ads_displayrate.date) = '05' GROUP BY ads_displayrate.name ORDER BY ads_displayrate.name ads_displayrate.date is a column of date type, so as far as I understand this should work. Is there some typo I'm missing? At 07:15 PM 1/9/03 +0100, you wrote: Oops! I missed again. If you specify conditions pertaining to the right-hand table, such as: ads_clickrate.date = '2001', Then you will lose all result rows for which the right-hand data is NULL. Not the expected result. So your restricting WHERE clauses must apply to the left-hand table only. Therefore: WHERE YEAR(ads_displayrate.date) = '2003' AND MONTH(ads_displayrate.date) = '01' (if your table ads_displayrate has such date fields). HTH Ignatius - Original Message - From: "Lisi" <[EMAIL PROTECTED]> To: "Ignatius Reilly" <[EMAIL PROTECTED]> Sent: Thursday, January 09, 2003 6:54 PM Subject: Re: [PHP-DB] LEFT JOIN not working > Cool! It's mostly working now, the only problem is it's ignoring the other > clauses in the ON clause that select the desired date. Perhaps it's not > supposed to be connected this way? How would I select specific dates? > > Thanks again, > > -Lisi > > At 01:20 PM 1/9/03 +0100, you wrote: > >Oops! Sorry, I missed it the first time. > > > >Your query should start as: > >SELECT ads_displayrate.name > >instead of > >SELECT ads_clickrate.name > > > >then you will always have a non-NULL name (coming from the table on the left > >of the LEFT JOIN). > > > >HTH > >Ignatius, from Brussels > > > >"Where the fuck is Belgium?" > >D. Ivester, CEO, Coca Cola > > > > > >- Original Message - > >From: "Lisi" <[EMAIL PROTECTED]> > >To: "Ignatius Reilly" <[EMAIL PROTECTED]>; "PHP-DB" > ><[EMAIL PROTECTED]> > >Sent: Thursday, January 09, 2003 1:11 PM > >Subject: Re: [PHP-DB] LEFT JOIN not working > > > > > > > Exactly my question - why does it not have a name? How would I modify my > > > query to get a row with a name but null value for date? I thought the join > > > would take care of this, but I'm obviously not doing it right. > > > > > > You mention a unique identifier, there is a separate table with a row for > > > each ad, containing name, URL, and a unique ID number (autoincrement). > > > Should this table be included somehow in the query? How would this help? > > > > > > Thanks, > > > > > > -Lisi > > > > > > At 12:45 PM 1/9/03 +0100, Ignatius Reilly wrote: > > > >Your 4th row ought to have an identifier of some sort. From your SELECT > > > >statement, this seems to be the name. Why does it not have a name? > >Probably > > > >what you want is a row with a name but a NULL value for > >ads_clickrate.date. > > > > > > > >(by the way it is EXTREMELY advisable to use an abstract identifier, such > >as > > > >an id, unique and required, instead of "name") > > > > > > > >Ignatius > > > > > > > >- Original Message - > > > >From: "Lisi" <[EMAIL PROTECTED]> > > > >To: "Ignatius Reilly" <[EMAIL PROTECTED]>; "PHP-DB" > > > ><[EMAIL PROTECTED]> > > > >Sent: Thursday, January 09, 2003 12:18 PM > > > >Subject: Re: [PHP-DB] LEFT JOIN not working > > > > > > > > > > > > > OK, this helped a bit. Now I have, in addition to the three rows of > >ads > > > > > that have ben clicked on, a fourth row with no ad name, 0 > >clickthroughs, > > > > > and 24 displays. That plus the other three account for all the > >displayed > > > >ads. > > > > > > > > > > However, since it is returning a null value for any ad name that has > >not > > > > > been clicked on, and then it's grouped by ad name, it lumps all > > > >non-clicked > > > > > ads into one row. What I need is to see each ad on a separate row, > >which > > > >is > > > > > what I thought a LEFT JOIN was supposed to do. > > > > > > > > > > Any suggestions? > > > > > > > > > > Thanks, > > > > > > > > > > -Lisi > > > > > > > > > > > > > > > At 11:07 AM 1/9/03 +0100, Ignatius Reilly wrote: > > > > > >problem 1: > > > > > >move the WHERE clauses to the ON clauses > > > > > > > > > > > >problem 2: > > > > > >Obviously your intent with " COUNT(ads_clickrate.date) " is to count > >the > > > > > >number of non-null occurences of click. But COUNT() is not the > > > >appropriate > > > > > >function to do this (it will simply give you the number of rows > >inside a > > > > > >group). > > > > > > > > > > > >Try replacing COUNT(ads_clickrate.date) by SUM( IF( > >ads_clickrate.da
Re: [PHP-DB] javascript and submitting forms
This works! Thanks Adam On Tue, 2003-01-14 at 03:11, Adam Royle wrote: > Hi Mignon, > > This should work, never closing the window without submitting > (foolproof). Just add some error checking, and you'll be sweet as a > nut! All I did was add the echo statement underneath the data insert. > > Adam > > > include ('dbconn.php'); > if(isset($submit)) >{ > $query = "INSERT INTO `comments` ( `track_id`, `cat_comments` ) > VALUES ( '0', '$comm' );"; > mysql_query ($query, $link ); > > echo ' language="JavaScript">window.close(); html>'; > > } > ?> > > > > > > > > Enter your details here: > > > > > > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] javascript and submitting forms
Thanks again for the advice. This approach wont work in this case because I'm launching the window from an app, then I need to close to return to the app. If I submit back to my app, it brings a new app into the addl window. And no, you're definetly not stupid ! Thanks for the help. Mignon On Mon, 2003-01-13 at 15:51, Micah Stevens wrote: > > Wait, I'm stupid. You're closing the window upon submission of the form, > so that will close the session, so the php at the beginning will never > process after form submission. Make the form submit to another page that > won't be closed. > > -Micah > > On Mon, 2003-01-13 at 13:24, Mignon Hunter wrote: > > > Unfortunately I havnt gotten it to work yet. Am I missing something ? > > > > PS the query works without the closewindow() > > > > > include ('dbconn.php'); > > if(isset($submit)) > > { > > $query = "INSERT INTO `comments` ( `track_id`, `cat_comments` ) VALUES > > ( '0', '$comm' );"; > > mysql_query ($query, $link ); > > } > > ?> > > > > > > > > > > > > > > > > > > > > Enter your details here: > > > > > > > onClick="return window.close();"> > > > > > > > > > > > > > > On Mon, 2003-01-13 at 14:44, Micah Stevens wrote: > > > The window.close(); function is not returning control to the form after > > > closing the window. You must tell it to do so. Use: > > > > > > onClick="return window.close();" > > > > > > This will return the window.close() value to the submit button so that > > > it can do its thing after the window has been closed. > > > > > > Use the same thing for the other form items too. > > > > > > Hope this helps. > > > -Micah > > > > > > > > > > > > On Mon, 2003-01-13 at 12:31, Mignon Hunter wrote: > > > > > > > Hello List, > > > > > > > > Has anyone had any problems using the onClick="window.close();" > > > > function within a input type = "submit" ? > > > > > > > > I'm trying > > > > > > > > > > > onClick="window.close();"> > > > > > > > > But evidently it's reading the close before the submit because the value > > > > of my form var is not being passed. > > > > > > > > I have also tried it in conjunction with a hidden field too. > > > > > > > > > > > > > > > onClick="window.close();"> > > > > > > > > If I dont use the onclick() the variable gets passed and/or entered into > > > > db just fine. > > > > > > > > Curious if anyone has had this problem or if anyone has any ideas...Thx > > > > Mignon > > > > > > -- > > > Raincross Technologies > > > Development and Consulting Services > > > http://www.raincross-tech.com > > > > > > > -- > Raincross Technologies > Development and Consulting Services > http://www.raincross-tech.com > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] how made php on FreeBSD connect to Oracle 8.1.5 on Windows 2000 server
You have to install the Oracle Client in your FreeBSD server in order to compile php with the -with-oci8=[ORA_PATH] that's why it didn't work At 09:24 PM 1/14/2003 +0800, Cedar John wrote: Hi!I am a newbie. I've got a system with FreeBSD_4.7_release+apache_1.3.27+php_4.2.3. I want access oracle 8i(8.1.5) on another server with my php. It says that 'can not find the lib' when I complied it with '--with-oci8'. What can I do?Where can I find 'the lib'(oracle oci8 library)? Thanks a lot! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Jadiel Flores - http://www.abargon.com [EMAIL PROTECTED] (52-55) 52-29-80-34 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] how made php on FreeBSD connect to Oracle 8.1.5 on Windows 2000 server
Hi!I am a newbie. I've got a system with FreeBSD_4.7_release+apache_1.3.27+php_4.2.3. I want access oracle 8i(8.1.5) on another server with my php. It says that 'can not find the lib' when I complied it with '--with-oci8'. What can I do?Where can I find 'the lib'(oracle oci8 library)? Thanks a lot! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Getting data from SQLBase on W2k
Hi I'm having big problems getting data from a SQLBase database located on a win 2000 server. There doesn't seem to be any ODBC-drivers to that particular database? Do you guys have any idea how I should solve the problem? I'm quite new to windows ODBC- connections and unfortunately I have to solve the problem anyway :-( / Antti Antti Ijäs Software designer -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] javascript and submitting forms
Hi Mignon, This should work, never closing the window without submitting (foolproof). Just add some error checking, and you'll be sweet as a nut! All I did was add the echo statement underneath the data insert. Adam include ('dbconn.php'); if(isset($submit)) { $query = "INSERT INTO `comments` ( `track_id`, `cat_comments` ) VALUES ( '0', '$comm' );"; mysql_query ($query, $link ); echo 'window.close();'; } ?> Enter your details here: -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Oracle and CLOBs
try SELECT Title, NewsDate, Content FROM inf_news WHERE ID_News = 5 Where Title is VarChar, NewsDate is Date and Content is CLOB ! not "Content is a CLOB" ! - simple "is CLOB" because i guess it interprets you say "is a" not "is a CLOB"..it thinks the datatype you are searching is "a" cybercop78 On Mon, 13 Jan 2003 19:35:04 -0600, Jadiel Flores wrote > Hi, I'm having a big problem with php and Oracle. > > I'm using Oracle 8.1.6 and PHP 4.2 with the Oracle component in a > Solaris server, I can not recompile apache and php to install the > oci8 component and I'm having lot of problems with CLOBs, I'm > receiving this error: > > Warning: Ora_Exec failed (ORA-00932: inconsistent datatypes -- while > processing OCI function OEXEC/OEXN) in > /var/www/espejo/includes/con.php on line 107 > > Line 107 contains this code: > Ora_Exec($this->cursor); > > The query is: > SELECT Title, NewsDate, Content FROM inf_news WHERE ID_News = 5 > Where Title is VarChar, NewsDate is Date and Content is a CLOB > > It works fine if the query doesn't contain a CLOB. > > Any suggestion??? > > Jadiel Flores > - > http://www.abargon.com > [EMAIL PROTECTED] > (52-55) 52-29-80-34 > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php http://www.idilis.ro - Stiri, e-mail gratuit, download, SMS, server de counter-strike, hosting gratuit, servicii internet... Fii cu un pas inaintea celorlati! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] browsing sorted resultsets from an oracle db
try steping like this: 1. select all you have to find; like dates[][] ..the result is a matrix if you have more then one field 2. register that values with session_register("dates") 3. in every page you have to put a starting counter with it you have to display the values starting with... like "show_results.php?start=100" and the next "show_results.php?start=110" 4. in "show_results.php" you have to extract the parameter with GET ..$start_counter=$_GET['start']; and global $dates; display the $dates[$start_counter=$i]... cybercop78 On Mon, 13 Jan 2003 16:57:42 +0100, Markus Mirsberger wrote > Hi, > > I got the following ( simple :) ) problem. I have like 1 million > keys and I want to browse through them like"show next 10" or > "show last 10" or "show next" or "show last" for example. this is > pretty easy in mysql but for some reason not in oracle:) The first > solution I had is to have a subselect where I select all data, > number it and select the data I want to show from this subselect. > But every single site takes ages to load and its not very > intelligent to get all data first, number it and then just select > like 100 rows from that subselect :) I think many people have/had > this problem but I didnt find anything while searching the web. > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php http://www.idilis.ro - Stiri, e-mail gratuit, download, SMS, server de counter-strike, hosting gratuit, servicii internet... Fii cu un pas inaintea celorlati! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] converting from form -> dropdown box
hi, all you have to do is to extract values from the database with a query. i suppose you know... after that you have to do all you have done till now except the dropdown toolbox(that is called actually a listbox). for the list box you have to write like this: $records_returned[$i].'; ?> so the select it's here your input type text..and the other are the same like you have on that form. if you want an example on how to extract values from a database try to search on php.net because now i don't know what database you use and so on... cybercop78 On Mon, 13 Jan 2003 16:20:27 -0500, Dzung Nguyen wrote > Anybody could hep me converting the following form to dropdown box? > The easier task (I assume) is to populate the box with the all > possible values of a column in mySQL table (I don't know what how to > do this yet, though). I also haven't been able to find the > dropbox's equivalent of form's input lines that are hidden (e.g. > ). Thank > you, I really appreciate your help. > > $temphost = $host; > $tempselect = $select; > if ($select == all) { > echo "Choose host > > > > > > > > > > > > > size=17 maxlength=10>" ; echo "" ; } > > -- > Dzung V. Nguyen email: [EMAIL PROTECTED] > Alpha Linux Group http://linux.iol.unh.edu/clp > InterOperability Laboratory > University of New Hampshire phone: (603) - 862 - 0401 > Durham, NH 03824fax : (603) - 862 - 4181 > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php http://www.idilis.ro - Stiri, e-mail gratuit, download, SMS, server de counter-strike, hosting gratuit, servicii internet... Fii cu un pas inaintea celorlati! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php