Re: [PHP-DB] Authomatic Sorting

2001-07-05 Thread Dobromir Velev
When you delete a record it doesn't affect the other ones, so if you want to change the other ones you have to update them too. For this purpose I use the following SQL command after deleting a row: UPDATE table SET id_field=id_field-1 where id_fielddeleted_ID_value I hope this will help

[PHP-DB] about PHP Warning: failed to rollback outstanding transactions!

2001-07-05 Thread Michael Cheung
Hi; Linux 2.2.18 + oracle 8.1.7i + php 4.0.5 + oci8 I got a warning in log file. PHP Warning: failed to rollback outstanding transactions! I have simplify the script. it will cause the warning. function ShowError($errormsg,$dbh=false) { if($dbh!=false) OCILogOff($dbh); exit();

Re: [PHP-DB] about PHP Warning: failed to rollback outstanding transactions!

2001-07-05 Thread Thies C. Arntzen
On Thu, Jul 05, 2001 at 04:40:09PM +0900, Michael Cheung wrote: Hi; Linux 2.2.18 + oracle 8.1.7i + php 4.0.5 + oci8 I got a warning in log file. PHP Warning: failed to rollback outstanding transactions! I have simplify the script. it will cause the warning. function

[PHP-DB] Suggest Table Structure

2001-07-05 Thread kachaloo
Hi guys, I am making a table which will store articles for a site and the feilds are : ID int(6) NOT NULL auto_increment, CATEORY varchar(10) NOT NULL DEFAULT 'EVENTS' , HEADING varchar(30) NOT NULL DEFAULT '' , BODY longblob ,

Re: [PHP-DB] Suggest Table Structure

2001-07-05 Thread Sandis Jerics
Hi! It's exactly what i'm doing right now - each article may have many pictures, many authors, belong to many categories(sections), can be translated in some languages, etc. :) Sorry, i havent much time to explain your example, just paste mine here.. Perhaps you'll got the idea! CREATE TABLE

Re: [PHP-DB] Suggest Table Structure

2001-07-05 Thread Roger Ramirez
Make a table for pictures. Something simple that has an id and your picture then in your article table you just change your picture field to your picture id field. You may want to do the same thing with category and any other field if you notice that the article belongs in multiple categories.

Odp: [PHP-DB] Suggest Table Structure

2001-07-05 Thread Bartek Pawlik
The best way is to create extra table storing only pictures: CREATE TABLE PICS ID_PICS int(x) NOT NULL auto_increment, ID int(6) NOT NULL auto_increment [[foreign key from main table]] PICTURE longblob, Then you will be able to select pictures to certain article: SELECT picture from PICS WHERE

RE: [PHP-DB] mysql_query returns nothing?

2001-07-05 Thread Mark Roedel
-Original Message- From: Stefan Siefert [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 04, 2001 9:07 AM To: PHP Mailingliste Subject: [PHP-DB] mysql_query returns nothing? Hm, since we are using PHP 4.0.6 we do get sometimes no returnvalue...(function mysql_query) I think,

[PHP-DB] PHP MSSQL, IIS Question -- Size Question

2001-07-05 Thread Joshua Butcher
I am preparing a report for a database at my company that will be shown on the web. It has several nested tables and such in it. One of the fields to show is a blob field. If the blob field is too long, IIS will hang, and not be able to render the table. If the blob field is less than 2K

[PHP-DB] session troubles

2001-07-05 Thread Brad Wright
Hi all, Im new to this mailing list so im not sure what to expect from 'y'all' but i'm hoping this will be the beginning of a long and beautiful friendship. My question: i have a series of PHP4 pages that if I start a session (session_start()) on the first page (adminLogin.php), all is fine and

Re: [PHP-DB] session troubles

2001-07-05 Thread Mark Collin
are you setting your session before the head /head tags ?? if not that could be your problem - Original Message - From: Brad Wright [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 05, 2001 4:16 PM Subject: [PHP-DB] session troubles Hi all, Im new to this mailing list

[PHP-DB] Postgres and PHP and Apache

2001-07-05 Thread Kelly Hamlin
root@www:/var/lib/apache/bin# ./apachectl start Syntax error on line 239 of /var/lib/apache/conf/httpd.conf: Cannot load /var/lib/apache/libexec/libphp4.so into server: libpq.so.2: cannot o pen shared object file: No such file or directory ./apachectl start: httpd could not be started alright,

RE: [PHP-DB] sybase_query()

2001-07-05 Thread jong jong
Ryan, Thank you for your reply. I tried this, but it still didn't work. Any insert, update or delete statement will cause failure even it's the only query in my program. select is always fine. Anyone have any idea about this? Wen --- Ryan [EMAIL PROTECTED] wrote: Here's a rundown of some

Re: [PHP-DB] Postgres and PHP and Apache

2001-07-05 Thread Kelly Hamlin
i compiled using apxs /configure --with-apxs=/var/lib/apache/bin/apxs --with-xml --with-zlib --wit h-gd --with-mysql --with-pgsql --enable-inline-optimization --with-sysvseh - Original Message - From: Steve Brett [EMAIL PROTECTED] To: Kelly Hamlin [EMAIL PROTECTED]; [EMAIL PROTECTED]

[PHP-DB] login twice

2001-07-05 Thread andRie Is
Hello php-db, anyone knows how to avoid user to login twice in different computer ? for exam : User A login using computer D, and then A go to computer E and A login again. how to restrict A to login using computer E when he have another session in computer D ? ,,,

[PHP-DB] setting cookies so the cookie will expire when the user's session ends.

2001-07-05 Thread Ken Sommers
Hello, any way to set cookies so the cookie will expire when the user's session ends. IN PHP 4? Ken -- 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:

[PHP-DB] odbc and inner joins...

2001-07-05 Thread David W. Jablonski
I'm trying to use odbc_do with a select statement that uses inner joins. When I type the Select statement directly into the query window for MSSQL 2000 the query runs fine. I use the same select statement through odbc and I get this error: Warning: SQL error:

[PHP-DB] PHP , MSSQL and ODBC

2001-07-05 Thread olinux
Hey all - I would like to connect to a MSSQL server and do not know how. I have only worked with MySQL which is pretty easy to set up. Can you tell me how to go about this? Do I need to set up ODBC first? I imagine that it is not as simple as MySQL but will not be much different. Thanks much,

RE: [PHP-DB] login twice

2001-07-05 Thread olinux
could you set up a STATUS field to hold 0 for not logged in and 1 for logged in? Then Login script would update the STATUS field. likewise the logoff would as well. [You would need a way to timeout a user as well]. I am sure this is not the best way, but seems simple. -Original Message-

[PHP-DB] how to get ERROR message

2001-07-05 Thread jong jong
Hi, How can I see the error message from browser? My code is like this: htmlbody ? $conn=mssql_connect(xxx,,); mssql_select_db(xxx,$conn); $result=mssql_query(exec x) or die(query failed); mssql_free_result($result); ? /body/html I got query failed on the browser screen and

[PHP-DB] Cookie is set?

2001-07-05 Thread Adv. Systems Design
anyone have a good method or code snippet to check if the user is accepting cookies? Thanks luis __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- PHP Database Mailing List

Re: [PHP-DB] how to get ERROR message

2001-07-05 Thread support
echo mysql_error(); Allen Lee http://MissoulaWeb.com $10/month PHP4 and MySQL hosting On Thu, 5 Jul 2001, jong jong wrote: Hi, How can I see the error message from browser? My code is like this: htmlbody ? $conn=mssql_connect(xxx,,); mssql_select_db(xxx,$conn);

Re: [PHP-DB] Authomatic Sorting

2001-07-05 Thread Ken Sommers
HI, Look into Optimizing the Table.. it seems to clean up the holes. Ken - Original Message - From: Wilmar PĂ©rez [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: Wednesday, July 04, 2001 1:50 PM Subject: [PHP-DB] Authomatic Sorting Hello guys I have the following two problems:

Re: [PHP-DB] Authomatic Sorting

2001-07-05 Thread Miles Thompson
Well, my comment on this is that the autoincrement field is giving you a primary key which is not changing, and this is good. Check the scripts you used to build the tables, and your MySQL docs for the MyISAM table type. When tables are defined as being of the type MyISAM, the autoincrement

[PHP-DB] What does these error message mean?

2001-07-05 Thread jong jong
I got the error messages with your help. Unfortunatly, I didn't see any problem in these message. Here is the messages on my browser by loading the php file: Changed database context to 'pubs'. Changed database context to 'pubs'.query2 failed! Changed database context to 'pubs'.query3

[PHP-DB] Re: login twice

2001-07-05 Thread Dean Hall
anyone knows how to avoid user to login twice in different computer ? for exam : User A login using computer D, and then A go to computer E and A login again. how to restrict A to login using computer E when he have another session in computer D ? If you have a user database

[PHP-DB] Re: What does these error message mean?

2001-07-05 Thread Kelvin
Hi Jong, The problem is your Query is in looping situation. Because you didn't close the link after your first inserted. It doesn't matter that you use (mssql_free), you still need to close the link first. The function of mssql_free is just free up the content of that

[PHP-DB] Re: Dbase function problem AGAIN !!!

2001-07-05 Thread Kelvin
Hi there, When u retrieve the data, did u specific the starting point. 0 or 1, because PHP is start from 0 bit. Kelvin. Bartek Pawlik [EMAIL PROTECTED] wrote in message 005401c0ffcd$848d3880$539f4dd5@administrator">news:005401c0ffcd$848d3880$539f4dd5@administrator... Why noone

[PHP-DB] Re: setting cookies so the cookie will expire when the user's session ends.

2001-07-05 Thread Kelvin
Hi Ken, Do not specific the time in your cookie. ex: setcookie(usercookie,$username); once the user close the session, it will terminate the cookie. Kelvin. Ken Sommers [EMAIL PROTECTED] wrote in message

Re: [PHP-DB] Re: What does these error message mean?

2001-07-05 Thread jong jong
Your suggestion sounds interesting. But how to close the link? Do you mean mssql_close()? What I know is that we can do multiple querys during one database connection. I guess I didn't explain my problem clear enough. Sorry about that. My point is why query works always well until the first

[PHP-DB] Re: how to find biggest value of a field across 2 tables?

2001-07-05 Thread Hugh Bothwell
Noah Spitzer-Williams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... i have two tables each with a same field and i would like to find which table has the bigger value in this field.. is there a way to do this with one select statement? i've tried things like: select

[PHP-DB] Newbie:Backend scripts

2001-07-05 Thread PHPFAN
Hi, I am using php4 with mssql backend loaded on windows 2000. Here is my problem: I want to update my database contents every 2 hours with some sql statements. Is there anyway I can write scripts in php and run them every 2 hours? Anyother solutions are most welcome. Thank You, Sagil. --

RE: [PHP-DB] Newbie:Backend scripts

2001-07-05 Thread Beau Lebens
Sagil, the way I do something like this is write a script using PHP that does exactly what you want, without any input or anything like that, then just set up cron to run that script every 2 hours. you can use either lynx to hit it as a webpage, or it's an admin script or something that you don't

Re: [PHP-DB] Newbie:Backend scripts

2001-07-05 Thread PHPFAN
Hello Beau Lebens, Thank you very much for the advice. I am using windows 2000/NT.So do you happen to know how to handle it in windows? Sagil. Beau Lebens [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Sagil, the way I do something like this is write a

[PHP-DB] Help Needed !! -- Handling uploaded files by a script

2001-07-05 Thread sdfdn
Hi ... my name is Peter and I'm quite a rookie in PHP but not a total starter. ok ... in the file there is a form that contains one type file field... when I'm sending it to my script ... the is_uploaded_file() doesn't do anything... the variable ($pic_file) contains only the string with the

RE: [PHP-DB] Newbie:Backend scripts

2001-07-05 Thread Beau Lebens
Sagil, you can get a binary for lynx from the web (search for it, can't remember url off the top of my head :P), install that, then make a quick batch file such as; scheduled.bat- @echo off c: cd \lynx\ lynx -source %1

RE: [PHP-DB] Newbie:Backend scripts

2001-07-05 Thread Beau Lebens
// OK, i just checked and tested (jeez i'm a nice guy.. :P) and // dodgy Windoze // schedule doesn't allow you to do it by the hour, so if you // want it every 2 // hours, you'll have to set one, daily at 2am, one daily at // 4am etc etc, all // doing the same thing. change this, under the

Re: [PHP-DB] Newbie:Backend scripts

2001-07-05 Thread PHPFAN
Thank you very much for your help Beau!!! Sagil. Beau Lebens [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... // OK, i just checked and tested (jeez i'm a nice guy.. :P) and // dodgy Windoze // schedule doesn't allow you to do it by the hour, so if you //

Odp: [PHP-DB] Re: Dbase function problem AGAIN !!!

2001-07-05 Thread Bartek Pawlik
No, I did not Haw can I do it in dbase_get_record function?? PS. Do you know if someone is going to fix bugs in dbase_** functions. There are lots of them!! - Original Message - From: Kelvin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 06, 2001 12:09 AM Subject: [PHP-DB]

Re: [PHP-DB] Re: setting cookies so the cookie will expire when the user's session ends.

2001-07-05 Thread Ken Sommers
Kelvin, thanks, do you believe or hopefully even know that that expiration time for this cookie: setcookie (TestCookie, $value,time()+3600); /* expire in 1 hour */ will be one hour after the cookie is set OR one hour after the session expires? Ken Kelvin [EMAIL PROTECTED] wrote in message

RE: [PHP-DB] Re: setting cookies so the cookie will expire when the user's session ends.

2001-07-05 Thread Beau Lebens
one hour after the cookie is set, the session won't expire as such until either 1. the user closes their browser and destroys temporary cookies (not the case if you set expiry time) 2. the expiry time is reached 3. you determine from some other method (i.e. a different variable is set to fale or