Re: [PHP-DB] Oracle session cursor
Hi ! I think the only way to do one query is DO one query into the sesission variable array and create index of current shown row and so you will get it works. session_register ("storage_array"); storage_array = array(); session_register("curr_idx");$curr_idx=-1; # your select here into storage_array, now you get # storage_array["COLUMN_NAME"][0] = something so in client's page you write: echo storage_array["COLUMN_NAME"][$curr_idx]; $curr_idx++; By, Aleksey ""Doug Schasteen"" [EMAIL PROTECTED] wrote in message 001d01c0c62e$4b7aace0$b1045ad1@doug">news:001d01c0c62e$4b7aace0$b1045ad1@doug... As you all know, PHP is stateless. Meaning that once the script ends, all connections are closed and the program is done. I have a project where I need to do just 1 query to oracle, but only get one row per page. So on the first page it does the query and says "20 results total" and shows the first selected row. Then I click next and it brings up the second row. I'm only supposed to show one row at a time. I can probably cheat and parse the query on each page, but I'd like to find out from you nice folks if its possible to do it with just one query. My guess is that I would be using a persistant OCI connection and an oracle package/procedure, but I'm not familiar with either of those enough to know if its possible or not. Or maybe I could store my parsed query in a PHP4 session? Thats another thing I am not very familiar with at this time. Any info would be helpful. This project is due on wednesday so I need the help ASAP. Thanks. - Doug Schasteen -- 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] sessions and page has expired warning
Hi! I had exactly the same problem with back/forward and i found the script that does the job: ""olinux"" wrote in message 000a01c0c0aa$2d465050$6401a8c0@amdk7">news:000a01c0c0aa$2d465050$6401a8c0@amdk7... I am using sessions to store variables until all forms have been filled out. at this point they are put into the db. I would like to know how i can eliminate the problem that occurs when the user presses the back button. I receive a "warning, page has expired... press refresh" I know that pressing refresh works fine, but some people do not understand and get confused. How can i fix this? thanks much olinux -- 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 session cursor
Hello Doug, On 16-Apr-01 01:29:30, you wrote: As you all know, PHP is stateless. Meaning that once the script ends, all connections are closed and the program is done. I have a project where I need to do just 1 query to oracle, but only get one row per page. So on the first page it does the query and says "20 results total" and shows the first selected row. Then I click next and it brings up the second row. I'm only supposed to show one row at a time. I can probably cheat and parse the query on each page, but I'd like to find out from you nice folks if its possible to do it with just one query. My guess is that I would be using a persistant OCI connection and an oracle package/procedure, but I'm not familiar with either of those enough to know if its possible or not. Or maybe I could store my parsed query in a PHP4 session? Thats another thing I am not very familiar with at this time. You may want to try Metabase. It is a database abstraction package that has a feature that makes all database work like as if all supported databases, including Oracle with OCI, had the LIMIT clause like MySQL. The way it works is just by calling before executing a query: MetabaseSetSelectedRowRange($database,$first,$limit) where $database is a previously set up Metabase $database handle, $first is the first row you want to fetch and $limit is the number of rows you want to fetch for this query. In your case $limit should be one. You may download Metabase for free with documentation and a tutorial from here: http://phpclasses.UpperDesign.com/browse.html/package/20 Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp -- -- 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] How to back up database..... ?
On Mon, Apr 16, 2001 at 12:40:05AM +0800, E K L wrote: Hi all, Is there anyone can tell me how to back up Mysql database from one server to other server? Please advisethanks backup to zip: mysqldump --add-drop-table -u root -ppass database | gzip /dir/database.gz -- Jason Stechschulte [EMAIL PROTECTED] -- Remember though that THERE IS NO GENERAL RULE FOR CONVERTING A LIST INTO A SCALAR. -- Larry Wall in the perl man page -- 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] Moving The Pointer In An Array
Lets say you have and array called $contentarray which contains the following values in this order: 10,19,9,8,234,3 These values represent the articleID. So if a person was on my site reading an article the url would look like so: http://website.com/read.php?articleID=8 So, the article the user is reading is 8. How do I tell the POINTER in the array that I am at $contentarray[3]? If I need to give more details, holla back. Steven -- 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] How to stop blank entries
Hi All Firstly thanks to the people who have helped in the past with my questions... My issue: I have a registration script which allows new users of a site to become a member. All works very well BUT if a new user just hit enter on the blank form then a new account is created with all fields except the id field blank allowing anyone just to hit enter a gain access. I have search the MySql docs, Php.net docs, this and other NG's but i can't find the solution to this. And how can i carry forward the username to be shown on all pages after sucessful login. I thank you in advance Dave C To email me remove the NOSPAM bit of my return email address -- 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]
FW: [PHP-DB] How to stop blank entries
Hello!! Use an If statement... if (!$username=="") exit else ... Or something like that Change the !$username to (!isset($username)) Or something like that... Just play around with the if statements...it works for me... But I may be wrong... Dan -- From: DC Sent: Monday, April 16, 2001 11:35 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] How to stop blank entries Hi All Firstly thanks to the people who have helped in the past with my questions... My issue: I have a registration script which allows new users of a site to become a member. All works very well BUT if a new user just hit enter on the blank form then a new account is created with all fields except the id field blank allowing anyone just to hit enter a gain access. I have search the MySql docs, Php.net docs, this and other NG's but i can't find the solution to this. And how can i carry forward the username to be shown on all pages after sucessful login. I thank you in advance Dave C To email me remove the NOSPAM bit of my return email address -- 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] Checking database if already exsists
Hi, assuming you have unique passwords. $result = mysql_query("SELECT COUNT(*) AS used FROM userTable WHERE passowrd=$password"); $exists = mysql_fetch_object($result); if ($exists-used) { display error that pswd is already in use } If there is an entry in your DB with the password the _fetch_object contains "used". You can do the same thing for username and e-mail. Johannes ""DC"" [EMAIL PROTECTED] schrieb im Newsbeitrag 9bfam9$jlm$[EMAIL PROTECTED]">news:9bfam9$jlm$[EMAIL PROTECTED]... Hi again How do i check my database when someone trys to become a member to check a see if username password email address is already in use and show the the bit they need to change for my script to allow them to register. Thanks again in advance Dave C -- 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] Permanent Cookies
Hi, could it be the setting of cookie_lifetime in your php.ini? or the coolie_path? just two thoughts cheers Johannes ""Lisa Elita"" [EMAIL PROTECTED] schrieb im Newsbeitrag 004f01c0c4df$1bd0e540$69fc2bca@hadinata">news:004f01c0c4df$1bd0e540$69fc2bca@hadinata... I tried to use cookies with this PHP code: SetCookie("cookiename", "cookievalue", "Friday, 16-Jan-2037 00:00:00 GMT", "/", ".myserver.com", 0); but it seems that the cookie is only store in memory (not as file). Can someone explain it to me... Best regards, Lisa Elita -- 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]