[PHP-DB] mcrypt, postgres, only returning half the data

2001-08-15 Thread John Starkey
Hello all I'm working on encoding some data going in and decrypting coming out of postgres. I'm adding slashes going in and stripping them coming out. Using BLOWFISH and I've tried several different modes. But each time the data comes out I'm only getting half-decrypted data, it seems to hang

[PHP-DB] problem with mysql_data_seek() fuction

2001-08-15 Thread Caleb Walker
br bWarning/b: Offset 0 is invalid for MySQL result index 2 in b/usr/local/www/data/football/front/index2.php/b on line b20/bbr When using mysql_data_seek($result,0) why do I get the above error in the source code of the html that is produced? Another side point is that this does not display

Re: [PHP-DB] includes and filenames

2001-08-15 Thread Jason Wong
- Original Message - From: travis forden [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 11:17 AM Subject: [PHP-DB] includes and filenames in effect i want a function that will find the filename of the includer file and past it into a link. something like

[PHP-DB] Getting info from Cookie

2001-08-15 Thread Cato Larsen
Hi! How can you extract a certain form of info from a Cookie? Im my case the cookie name is crispy. It has been stored with a session id and a charnick. How do I extract the charnick and use it in the page as $charnick or similar? Best Regards Cato Larsen -- PHP Database Mailing List

[PHP-DB] PHP mysql refresh problem

2001-08-15 Thread Michael McNeice
Using Xitami web server for windows (Win2k) php pages update mysql database. On checking database the mysql table has been updated ok. However the problem seems to be that when you return to the web page the table is still holding the original data. Is this a php scripting problem ? or a

[PHP-DB] Income on the Net!

2001-08-15 Thread Noel Hadfield
Here is an opportunity that you can take up FREE. If you join as an affiliate, we'll teach you how to build a profitable business on the Internet, using our system to create an income stream and earn income globally, 24 hours a day. Don't let this opportunity slip past you - our organization

[PHP-DB] delete user but keep the article

2001-08-15 Thread RSalomo
hi, i have a news article database that input by users, for example articlename: 'abc', input by username: 'user_x'. i want to delete user_x, but keep article abc. how php/mysql display that there is article named 'abc', input by 'user_x', but there are no further information about that user

RE: [PHP-DB] delete user but keep the article

2001-08-15 Thread Walter, Marcel
Do you really have to delete the users ? You could for example give the users a special flag which shows that the users can´t no longer log in ... so you have still the information about your user and the user cannot log in (at least if you check the flag) Is this okay ? -Original

[PHP-DB] Re: delete user but keep the article

2001-08-15 Thread Robert Hennig
hi Rsalomo, it seems you would have to do some more work. At the moment I see to possible ways to fix this: - Re-design your application so that the news articles don´t need a corresponding entry in the users table. Find another way to link user and entry. - Do some code which is executed when

[PHP-DB] Explode Your Business!

2001-08-15 Thread Customer Service

[PHP-DB] A bottle in the sea

2001-08-15 Thread rashkatsa
Hello ! I've read a lot of web, news and archives for two days and i've not resolve my problem. Here it is : Configuration : Apache 1.3.20 (Win32) / PHP 4.0.5 / MySQL 3.23.39 / Windows 2000 Pro (SP2 and update ok). Services : Apache and MySQL runs as services under 'toto' account. Note : i

Re: [PHP-DB] delete user but keep the article

2001-08-15 Thread Jordan Elver
Well I suppose that if you had a lot of users in your users table editing and adding articles then there could be a performance hit, but I don't know about this. Maybe someone else hasmore experince. How many users were you planning on? HTH, Jord On Wednesday 15 August 2001 05:42, you

Re: [PHP-DB] Getting info from Cookie

2001-08-15 Thread hassan el forkani
$http_cookie_vars['name_of_cookie'] At 09:57 15/08/01, Cato Larsen wrote: Hi! How can you extract a certain form of info from a Cookie? Im my case the cookie name is crispy. It has been stored with a session id and a charnick. How do I extract the charnick and use it in the page as $charnick

[PHP-DB] Re: mcrypt, postgres, only returning half the data

2001-08-15 Thread Tom Henry
John A second question to answer, it's not clear from your description --- is the encryption 'breaking' during en-cryption (before it stuffs the value into the database) so that all the data is not even getting into the database? -or- is ir breaking during de-cryption ? Sounds to me like

[PHP-DB] How to create table?

2001-08-15 Thread Jan Grafstrom
Hi! I have just started to learn about mysql and wonder if my code is good? ?php $connexion = mysql_connect(localhost,login,passwd) or die (ERROR de connexion on Server); print (Connection ok); mysql_select_db(database_name,$connexion) or die (Cant find db); $table= CREATE TABLE pet (name

Re: [PHP-DB] Re: delete user but keep the article

2001-08-15 Thread speedboy
i want to delete user_x, but keep article abc. how php/mysql display that there is article named 'abc', input by 'user_x', but there are no further information about that user (except maybe only Have a user status, 1 = active, 2 = deleted. So when they are deleted their account is made

Re: [PHP-DB] How to create table?

2001-08-15 Thread MERSAL
Your code is good but your forget something simple, look your code after Edit ?php $connexion = mysql_connect(localhost,login,passwd) or die (ERROR de connexion on Server); print (Connection ok); mysql_select_db(database_name,$connexion) or die (Cant find db); $table= CREATE TABLE pet

Re: [PHP-DB] How to create table?

2001-08-15 Thread Miles Thompson
Jan, to which you add $result = mysql_query( $table ); which will execute your statement and create the table. And I think pet (name VARCHAR(20) should bepet VARCHAR(20) HTH - Miles At 02:03 PM 8/15/01 +0200, Jan Grafstrom wrote: Hi! I have just started to learn about mysql

RE: [PHP-DB] How to create table?

2001-08-15 Thread Walter, Marcel
pet (name VARCHAR(20) is okay Because he wrote: create table pet ( -- pet = Table Name name VARCHAR(20), owner ) the query is okay ... But I would allow NULL in the death - column (I don´t know what the default is in MySql) Or is every (!) pet you enter in your

Re: [PHP-DB] Getting info from Cookie

2001-08-15 Thread Cato Larsen
Thanks! But how do you extract a certain point of info from it? The info is seperated by + (without the 's) I used: ?php echo $HTTP_COOKIE_VARS[TestCookie]; ? And I got Cato+bec39d1ca1091da20b4a8ef5ecacfde8 Where bec39d1ca1091da20b4a8ef5ecacfde8 is the session id for the MySQL database, and

[PHP-DB] A newbie question

2001-08-15 Thread Wilmar Pérez
Hi guys This may sound a bit silly but don't know how to do it. I've got the following print statements, I would like them to be links, how do I do that? print(liComunicaciones/libr); print(liInvidentes/libr); print(liCirculación/libr); print(liReferencia/libr);

RE: [PHP-DB] A newbie question

2001-08-15 Thread Walter, Marcel
You tried this: print(a href=whateverpage.phpLink/a); = Watch the ... How should print know where your output is terminating ? Try either: print a href=\whateverpage.php\Link/a; - In here you can use variables (like: $link) they will get parsed ... Or: print 'a

Re: [PHP-DB] includes and filenames

2001-08-15 Thread Justin Buist
So you want the footer to link to the page that called it? echo a href=\$SCRIPT_NAME\text/a or echo a href=\$PHP_SCRIPT\text/a Justin Buist Trident Technology, Inc. 4700 60th St. SW, Suite 102 Grand Rapids, MI 49512 Ph. 616.554.2700 Fx. 616.554.3331 Mo. 616.291.2612 On Tue, 14 Aug 2001,

RE: [PHP-DB] A newbie question

2001-08-15 Thread Brunner, Daniel
Hello!! Here use ECHO instead. echo (a href=list.php?Art_Number=$data-Art_JobHOSTNAME=$HOSTNAMEDATABASE=$DAT ABASE$table=$table$data-Art_Number/a); Notice $data-Art_job... $data is coming from mysql_fetch_object($result); That way you click on the actual Field result..Or in this

[PHP-DB] Averaging Numbers

2001-08-15 Thread Jeff Oien
I'm having a hard time learning how to get an average. I have a database that gets a number and inserts in into a MySQL database every 1/2 hour during the day. For the current half hour, I want to get the last 15 days numbers for the same time as the time it is now. I can retrieve and display the

Re: [PHP-DB] Averaging Numbers

2001-08-15 Thread Andre P.
Maybe I am missing the complexity but I would just add them all up as you retrieve them (or where you are printing them out) and then when you finish the loop divide the total by the number of of number you are averaging over have (i.e this would be 15 if you are taking 15 days). something

RE: [PHP-DB] Averaging Numbers

2001-08-15 Thread Jeff Oien
I'm real sorry to say I don't know the answer to your question unless there's a php function to get an average (or write one yourself) but you say you've managed to get a script/process to run in conjunction with your database every half an hour...how do you do this!? I've been wanting

Re: RE: [PHP-DB] Averaging Numbers

2001-08-15 Thread Russ Michell
I have a cron job that runs on a Unix server that runs a PHP file that gets a number from a Web site and inserts it into the database. Jeff Oien Oh nuts! I thought there may be some way for a script to tell itself to re-run over X-period of time or even have some kind of stored procedure

RE: [PHP-DB] Averaging Numbers

2001-08-15 Thread Jeff Oien
That's exactly what I needed. Thanks. I'm absolutely awful with math and this is my first time averaging numbers from a database. Jeff Oien Maybe I am missing the complexity but I would just add them all up as you retrieve them (or where you are printing them out) and then when you finish

RE: [PHP-DB] Averaging Numbers

2001-08-15 Thread Robert Klinkenberg
You could also do a select sum(counter) from or, if the db supports it, select avg(...) from ... Saves you the trouble of counting. Robert Klinkenberg Van: Andre P. [SMTP:[EMAIL PROTECTED]] Verzonden:Wednesday, August 15, 2001 6:48 PM Aan: [EMAIL PROTECTED] CC: PHP-DB

[PHP-DB] Re: Averaging Numbers

2001-08-15 Thread Hugh Bothwell
Jeff Oien [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm having a hard time learning how to get an average. I have a database that gets a number and inserts in into a MySQL database every 1/2 hour during the day. For the current half hour, I want to get

[PHP-DB] Query and Date problem

2001-08-15 Thread Jeff Oien
I want to retrieve the last 15 days of data from a certain time but not today's. I have this but it's still giving me today's data: $today = date(Y-m-d); $sql = SELECT volume, date, time, id FROM $table_name where time = $time1 and date != $today ORDER by id desc LIMIT 15; (date != $today)

[PHP-DB] Re: Getting info from Cookie

2001-08-15 Thread Boaz Amit
Cato Larsen [EMAIL PROTECTED] wrote: How can you extract a certain form of info from a Cookie? Im my case the cookie name is crispy. It has been stored with a session id and a charnick. How do I extract the charnick and use it in the page as $charnick or similar? That depends on how you store

RE: [PHP-DB] Re: Query and Date problem

2001-08-15 Thread Jeff Oien
Jeff Oien [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I want to retrieve the last 15 days of data from a certain time but not today's. I have this but it's still giving me today's data: $today = date(Y-m-d); $sql = SELECT volume, date, time, id

Re: [PHP-DB] Getting info from Cookie

2001-08-15 Thread Jason Wong
- Original Message - From: Cato Larsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 9:03 PM Subject: Re: [PHP-DB] Getting info from Cookie Thanks! But how do you extract a certain point of info from it? The info is seperated by + (without the 's) I

[PHP-DB] PostgreSQL connections within classes collisions.

2001-08-15 Thread Justin Buist
I recently did a re-install of PostgreSQL and php4 on Debian, which has broken some development code here. None of the actual code has changed in days, which I can verify against the CVS tree, so I know it's one of two things: a) botched server config b) the code wasn't as robust as it should

[PHP-DB] show only some entries

2001-08-15 Thread Andrius Jakutis
Hello, I am just starting learning pHp, so, sorry for stupid questions. 1. How to make, that I could get output of only those entries, which name(field) is John. 2. How to make, that only 10 entries with John would be shown in the same page, and others would be on next page and so on. Thank

[PHP-DB] quick http question

2001-08-15 Thread Brian Weisenthal
i need a script to access a html file on the web. i need to pass a login and password to the server. i tried doing http:[EMAIL PROTECTED]:[EMAIL PROTECTED] , it didnt work, anyone have an idea how to do this? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail:

Re: [PHP-DB] show only some entries

2001-08-15 Thread Miles Thompson
Andrius, Tutorials at Webmonkey and Devshed and Zend (all .com) Good examples at www.thickbook.com Have a look at a couple, and by the time you've worked thourgh one of the simple database one's you'll have your answer. Miles At 09:46 PM 8/15/01 +0200, Andrius Jakutis wrote: Hello, I am

[PHP-DB] Re: show only some entries

2001-08-15 Thread Hugh Bothwell
Andrius Jakutis [EMAIL PROTECTED] wrote in message 003d01c125c2$fa6487a0$40722fd4@mano">news:003d01c125c2$fa6487a0$40722fd4@mano... 1. How to make, that I could get output of only those entries, which name(field) is John. SELECT * FROM table WHERE name='John' 2. How to make, that only 10

[PHP-DB] Connection to Oracle8i

2001-08-15 Thread rafael . gibrail
I have a server runs Oracle. And my Station is Linux and i run client for Oracle in it, with the variables of ORACLE_HOME, ORACLE_SID and other is in the bash_profile of my user. Then i change de httpd.conf to apache runs with my users and group. I use PHP4 in a REDHAT 7.1. My problem is whem i

[PHP-DB] list entries alphabetically

2001-08-15 Thread Andrius Jakutis
Hello again, How to list entries alphabeticall way? Using MYSQL. Thanks

Re: [PHP-DB] list entries alphabetically

2001-08-15 Thread KSchneider
$query = SELECT * FROM table WHERE field = 'criteria' ORDER BY field; $result = mysql_query(db,$query); this sort order is ascending. to get descending order, use: ORDER BY field DESC you should, however, go to the previously recommended site for a tutorial. your questions will be answered in

[PHP-DB] (OT) SQL query repeats

2001-08-15 Thread Adv. Systems Design
hello: I have 2 tables...lesson and lesson_gle (which holds repeating data for lesson, i.e. l_id, glenum) the following query gets results, but there are repeated entries (one for every repeat in lesson_gle table) SELECT * FROM lesson, lesson_gle WHERE lesson.l_id = lesson_gle.l_id HAVING

[PHP-DB] Re: (OT) SQL query repeats

2001-08-15 Thread Jonathan Hilgeman
If you use GROUP BY lesson.l_id after your ORDER BY lesson.l_id, you will not get any records with the same lesson.l_id value. - Jonathan Adv. Systems Design [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hello: I have 2 tables...lesson and lesson_gle (which

Re: [PHP-DB] list entries alphabetically

2001-08-15 Thread Miles Thompson
Andrius, Seriously, work through a SQL tutorial and you'll have all your questions answered. Here's a good link: http://developer.ecorp.net/sqltut.htm just remember that MySQL doesn't support sub queries. The ORDER clause in a SQL SELECT statement determines the order of the returned

Re: [PHP-DB] Connection to Oracle8i

2001-08-15 Thread rouvas
You have to compile PHP with Oracle option first and then try connecting to any Oracle backend. If you already have done that, you should use the 'oci' family of calls instead of the 'oracle' ones, unless you are trying to access an Oracle older than version 8. In your mail you state that you use

[PHP-DB] Re: (OT) SQL query repeats

2001-08-15 Thread Jonathan Hilgeman
Try one of the following: 1) Move the GROUP BY between WHERE and HAVING -OR- 2)SELECT l.*,lg.* FROM lesson l LEFT JOIN lesson_gle lg ON lg.l_id=l.l_id WHERE lg.glenum LIKE 'MA%' GROUP BY l.l_id ORDER BY l.l_id - Jonathan Adv. Systems Design [EMAIL PROTECTED] wrote in message [EMAIL

[PHP-DB] Warning: 0 is not a Sybase link index in

2001-08-15 Thread James Reategui
i am running apapche 1.3.20 on a UNiX box with php compiled with freetds support fro mssql server. I have a MSSQL 7 server I need it to connect to using the php commands. When I run an sql script with the mssql_connect function I get the following error: Warning: 0 is not a Sybase link index

[PHP-DB] using is_uploaded_file($userfile1)??

2001-08-15 Thread phpnet
Can someone tell me why this works in PHP4.0.3pl1 on one server and not in PHP4.0.6 on a different server? I am using is_uploaded_file($userfile1) LOAD DATA LOCAL INFILE '/var/tmp//phpAP3729' INTO TABLE spcdata FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\' ESCAPED BY '\\'

[PHP-DB] Seperate PHP.ini or configurations per Apache vhost?

2001-08-15 Thread Barry L. Jeung
Is is possible to specify different php.ini files or configuration values per vhost? Particularly I'm interested in the variable 'session.cookie_domain' . I have this set to the domain for the site I first used PHP with, but now I am using PHP sessions on other vhosts with different domains. How

[PHP-DB] Seperate PHP.ini or configurations per Apache vhost? Part 2

2001-08-15 Thread Barry L. Jeung
First off, I wanted to apologize for sending this to the wrong list. However the damage has been done, and I just wanted to post the resolution to this simple question I posted, found after a little searching at the following URL. http://www.php.net/manual/en/configuration.php With PHP 4.0,

[PHP-DB] some crazy interesting file read business

2001-08-15 Thread Brian Weisenthal
ok so i am trying to read in a file from the webthe catch is there is a username and password involved. my script works becuase i can read in www.yahoo.com. i have tried using file, fopen, and readfile, but with no success. when i try my file which looks like, http://username:[EMAIL

[PHP-DB] Re: replace string - case insensitive

2001-08-15 Thread Elman Cheng
try to change the string to uppercase or lowercase first. J- E- N wrote: hello str_replace is case sensitive, what function should i use for case insensitive. thanks very much. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

FW: [PHP-DB] Re: replace string - case insensitive

2001-08-15 Thread Lars B. Jensen
depending on what you're replacing with what, a solution is eregi_replace. I do not advice to upper nor lowercase the source as it will change parts of data unwantedly. / Lars www.ljweb.com -Original Message- From: Elman Cheng [mailto:[EMAIL PROTECTED]] Sent: 16. august 2001 10:41 To:

[PHP-DB] Close Postgresql Database Connection Problem !

2001-08-15 Thread Perrin
Hi ! There are some confusion for me. Could you help me ? Suppose I write a program by php and connect the postgresql database through web page. If I use the providing API from PHP connect to postgresql database, like that pg_connect(); == $connection = pg_connect($constr user='$USER'

Re: [PHP-DB] Re: replace string - case insensitive

2001-08-15 Thread Hugh Bothwell
Lars B. Jensen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... depending on what you're replacing with what, a solution is eregi_replace. I do not advice to upper nor lowercase the source as it will change parts of data unwantedly. Yes, I agree; another

RE: [PHP-DB] Re: replace string - case insensitive

2001-08-15 Thread Lars B. Jensen
Hugh, Looking through the code I am not doubting it works, but what I wonder if it is really a preferred choice over for example reg. expressions ? You have idea what would be the fastest performancewise choice here ? / LJ -Original Message- From: Hugh Bothwell [mailto:[EMAIL

[PHP-DB] odbc.ini

2001-08-15 Thread Sommai Fongnamthip
Hi, Could someone tell me how to write odbc.ini in Linux and related library to connect MS SQL on NT? Thanks Sommai Fongnamthip -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact

Re: [PHP-DB] Close Postgresql Database Connection Problem !

2001-08-15 Thread Grant Johnson
Perrin wrote: == $connection = pg_connect($constr user='$USER' password='$PW'); Actually It should be closed the connection after access finished, like that pg_close(); == pg_close($connection); But if the user force to close the web page that means have not close the connection. I