Re: [PHP-DB] Printing Issue

2003-06-10 Thread Becoming Digital
This is more of an OS/application program than it is a PHP issue. Besides, we don't even know which program you're using so we couldn't help if we tried. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: birdto [EMAIL PROTECTED] To: [EMAIL PROTECTED]

Re: [PHP-DB] special character in filename

2003-06-10 Thread Becoming Digital
I can't explain why addslashes() didn't work (incorrect placement in the script, perhaps), but take a look at htmlspecialchars() and htmlentities(). They're long shots, but they might help. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: Ole Hornauer

[PHP-DB] Count database-values

2003-06-10 Thread Robert Wanadoo
Hi everybody, I've got a little problem, which I can't solve. It is as follow: In my database I made a table with different fields. One of the fields is named 'bedrag' and contains a numeric value like 15.47 or 78.16 and so on. If I want a value of the table I use in most cases the following

[PHP-DB] Re: I looking for OCI8 client library files.

2003-06-10 Thread Philippe Saladin
Soony [EMAIL PROTECTED] a écrit dans le message news: [EMAIL PROTECTED] Hi, phpers.. I looking for OCI8 client library files for using OCI function in PHP to control Oracle DB. I like any information about that. Ask your dba (database administrator). If you have oracle, he would be able to

Re: [PHP-DB] forms with php/mysql

2003-06-10 Thread Philippe Rousselot
Thanks for your concern, but I put there the files for people to look at and not the running ones. And as you can notice there are no passwd or username in the connection.php that I put in a non accessible folder fr security reasons. Philippe Le Lundi 9 Juin 2003 20:48, Matthew Moldvan a

[PHP-DB] Third addition: 'Transfering variables'

2003-06-10 Thread André Sannerholt
Ok, now I have made a simple example of what I want: My script is devided in a PHP and a HTML Part. I have kept out several queries, connections, table-tags etc. in the HTML part. Just imagine there are several entries in the select-tag that is named persona. What I want is to keep all the

Re: [PHP-DB] Count database-values

2003-06-10 Thread Becoming Digital
So far no problems, but I want to count all these values. I tried with SUM but with the following code it doesn't work: $squery = SELECT SUM(bedrag) AS Total FROM finance WHERE posneg = 'af'; any suggestions how to do? I want to store it in a variabele ($total) so I can echo it. (E.g.:

[PHP-DB] ODBC and error management

2003-06-10 Thread Nico Sabbi
Hi, reading both the documentation and the MARC I found two serious misbehaviours: 1) it seems that it's impossible to tell a query that is correct but has no records from a query which is syntactically wrong (and consequently has no records); or at least it seems to be impossibile to

Re: [PHP-DB] Count database-values

2003-06-10 Thread Becoming Digital
I screwed up my own code. Silly me. It should read: $query = SELECT SUM(bedrag) AS Total FROM finance WHERE posneg = 'af'; $result = mysql_query( $query ); while ( $total = mysql_fetch_array( $result ) ) { $total = $total['Total']; } Edward Dudlik Becoming Digital www.becomingdigital.com

RE: [PHP-DB] ODBC and error management

2003-06-10 Thread George Pitcher
Nico, I'm using MyODBC to query MySQL (because my client want's it to work in Access, and I don't and this leaves the least amount of code to change). I don't get an error message if the result is empty (no records). I do a while loop and add to a counter and if the counter 1 then its empty

[PHP-DB] Re: What is the maximum number of rows per table ?

2003-06-10 Thread Becoming Digital
If you look closely, you'll see that the max size is related to the max number of rows. I'm almost sure that you're running into a conflict with the size more than the row count. Also stated in the manual is that v3.23 only supports table sizes of 4GB, but the default max is set to 2GB. Edward

[PHP-DB] Remote ODBC

2003-06-10 Thread Ettore Sparvieri
Hi to all. How i connect to remote ODBC with php? Tnx to all!!

[PHP-DB] Remote ODBC

2003-06-10 Thread Ettore Sparvieri
Hi to all. How i connect to remote ODBC with php? Tnx to all!! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] array fill/sort question

2003-06-10 Thread Snijders, Mark
hi, I'm working on a ipaddres/subnet programm now i have a talbe with a lot of information about ip-addresses i'm having this query: SELECT s_id, subnet_name,subnetaddr,subnetmask,dnsdomain, location, contact, ccn FROM subnets the subnetaddr field looks like this : 100.20.20.1 and is

Re: [PHP-DB] array fill/sort question

2003-06-10 Thread Kieu D. Trang
hi, you can add the ip2long() function into your SELECT statement and have an ORDER BY clause at the end like this... SELECT s_id, subnet_name, ip2long('subnetaddr'), subnetmask,dnsdomain, location, contact, ccn FROM subnets ORDER BY subnetaddrr; hope it helps. KD On Tue, 10 Jun 2003,

Re: [PHP-DB] array fill/sort question

2003-06-10 Thread Becoming Digital
I might be overlooking something, but can't you just do this? $query = SELECT s_id, subnet_name,subnetaddr,subnetmask,dnsdomain, location, contact, ccn FROM subnets ORDER BY subnetaddr; If you can't, you can sort the array like this. ? $query = SELECT s_id,

[PHP-DB] Re: MySQL CONNECTION PROBlem2

2003-06-10 Thread nabil
but when i used mysql_error() i got : sorry database not found as my dbconnect.php file includes ? mysql_connect(192.168.0.111 , root , password) or die(SORRY CANNOT CONNECT) ; mysql_select_db(kt) or die(sorry database not found); ? and the user table of mysql database : # # Dumping data for

Re: [PHP-DB] MySQL CONNECTION PROblem

2003-06-10 Thread nabil
but when i used mysql_error() i got : sorry database not found as my dbconnect.php file includes ? mysql_connect(192.168.0.111 , root , password) or die(SORRY CANNOT CONNECT) ; mysql_select_db(kt) or die(sorry database not found); ? and the user table of mysql database : # # Dumping data for

Re: [PHP-DB] how to update field without using UPDATE query? youare kidding?

2003-06-10 Thread Robert Twitty
In order o update fields without using a UPDATE statement you have to use a cursor. In general, this is how ADO (the technology used by ASP) performs its updates in the manner you outlined below. There are no extensions bundled with PHP of which I am aware that allow you to update data via a

RE: [PHP-DB] how to update field without using UPDATE query? you are kidding?

2003-06-10 Thread Mark
I assume that dbrec is an object. There are many classes you can get in PHP that handle database management and manipulation. Check out www.phpclasses.org. I believe everyone's frustration is that the question was not asked properly, you confused PHP with Linux, you insulted the OS of choice for

[PHP-DB] Is this query even possible?

2003-06-10 Thread Susan Ator
This is what I am trying to do: if ($FUNC==(USERPOST) || $FUNC==(MODU)) { $sql = UPDATE newdacs SET emailfwd='$emailfwd', mformat='$mformat', filter_code='$filter_code' if

[PHP-DB] mcrypt decryption problem

2003-06-10 Thread mark hurty
I have been trying to set encryption using the mcrypt module. Everything seems to work, until the decrypt step, where only the first 8 characters of the encrypted string are decrypted. Here's the code I'm using to encrypt: $mcrypt_key = 24 character key goes here; $mcrypt_module =

RE: [PHP-DB] Is this query even possible?

2003-06-10 Thread Matthew Moldvan
I would say something like the following would work better: if($FUNC==USERPOST || $FUNC==MODU) { $sql .= UPDATE newdacs; $sql .= SET emailfwd='$emailfwd',; $sql .= mformat='$mformat', $sql .= filter_code='$filter_code'; if($FUNC=='USERPOST')

RE: [PHP-DB] Is this query even possible?

2003-06-10 Thread Hutchins, Richard
Yup, Matthew's right. I definitely forgot the other $sql. = that needs to go in front of the WHERE clause. Question for Matthew though: Is this: $sql .= UPDATE newdacs; $sql .= SET emailfwd='$emailfwd',; $sql .= mformat='$mformat', $sql .= filter_code='$filter_code';

[PHP-DB] Ignoring specific values in an inner join query?

2003-06-10 Thread André Sannerholt
Hi everybody. How to let mysql ignore specific values in an inner join query? In this case I want it to ignore Null-Values! $abfrage3=select distinct Anschriften.ID as aid, Anschriften.PLZ as aplz, Anschriften.STRASSE as astrasse, Anschriften.HNR as ahnr from Anschriften inner join Master on

RE: [PHP-DB] Is this query even possible?

2003-06-10 Thread Matthew Moldvan
Keep in mind the code I sent is untested ... and I realized some errors when I pasted it into a PHP page. Corrections are below. As for the line breaks, I've used SQL formatted that way before and it hasn't cause me any problems. Regards, Matt. Corrections: $sql .= mformat='$mformat', should

RE: [PHP-DB] Is this query even possible?

2003-06-10 Thread Ford, Mike [LSS]
-Original Message- From: Susan Ator [mailto:[EMAIL PROTECTED] Sent: 10 June 2003 16:18 This is what I am trying to do: if ($FUNC==(USERPOST) || $FUNC==(MODU)) { $sql = UPDATE newdacs SET emailfwd='$emailfwd',

RE: [PHP-DB] Count database-values

2003-06-10 Thread Ford, Mike [LSS]
-Original Message- From: Becoming Digital [mailto:[EMAIL PROTECTED] Sent: 10 June 2003 12:15 I screwed up my own code. Silly me. It should read: Surely your first attempt is the right one? There's only ever going to be 1 Total, so why waste a while loop trying to read more than

RE: [PHP-DB] Is this query even possible?

2003-06-10 Thread Susan Ator
See, this is why I cringe when I hear the management say 'No open source. There's no support'. You guys are great. It works a treat. (I ended up going with the conditional operator) Thanks! susan -Original Message- From: Matthew Moldvan [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10,

RE: [PHP-DB] Is this query even possible?

2003-06-10 Thread Ford, Mike [LSS]
-Original Message- From: Matthew Moldvan [mailto:[EMAIL PROTECTED] Sent: 10 June 2003 16:50 As for the line breaks, I've used SQL formatted that way before and it hasn't cause me any problems. It's a matter of preference, but I prefer to keep my query strings as lean as possible

[PHP-DB] Authentication Classes

2003-06-10 Thread Becoming Digital
I need an authentication class for an upcoming project so I took a trip over to the Repository. Unfortunately, the ratings system appears to be down (or no one uses it) and it's a bit difficult to determine which of the 40 offerings is best. Rather than play the trial and error game, I'm

Re: [PHP-DB] Count database-values

2003-06-10 Thread Becoming Digital
Unfortunately, I can't, despite my best efforts, get the data to display unless it's put inside a loop. If anyone can tell me how to, I'd just for joy. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: Ford, Mike [LSS] [EMAIL PROTECTED] To: 'Becoming

RE: [PHP-DB] Count database-values

2003-06-10 Thread Hutchins, Richard
Edward, Have you considered trying mysql_result()? It appears that your query is going to always return a single piece of data: Total. So you essentially have an array with only a single element. If you did this: $total = mysql_result($result,0); You'll get the value of the item at index 0

RE: [PHP-DB] Ignoring specific values in an inner join query?

2003-06-10 Thread Gary . Every
$abfrage3=select distinct Anschriften.ID as aid, Anschriften.PLZ as aplz, Anschriften.STRASSE as astrasse, Anschriften.HNR as ahnr from Anschriften inner join Master on Anschriften.ID=Master.A inner join Master as m on Master.FN=m.FN inner join Personen on m.NN=Personen.ID where Personen.Name

Re: [PHP-DB] Count database-values

2003-06-10 Thread Becoming Digital
I love when things go completely over my head for no apparent reason. I have an incredible talent for missing the obvious. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: Hutchins, Richard [EMAIL PROTECTED] To: 'Becoming Digital' [EMAIL PROTECTED];

[PHP-DB] mysql_connect error

2003-06-10 Thread Sparky Kopetzky
Good afternoon! I have Apache w/php installed on one server. I have mysql installed on a windows machine. I keep getting this error 'Call to undefined function: mysql_connect()' in my php script. Now, according to what the Redhat RPM is telling me about php-mysql is that I have to have mysql

Re: [PHP-DB] mysql_connect error

2003-06-10 Thread CPT John W. Holmes
PHP was not compiled with MySQL support. Re-compile. ---John Holmes... - Original Message - From: Sparky Kopetzky [EMAIL PROTECTED] To: PHP DB Group [EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 3:35 PM Subject: [PHP-DB] mysql_connect error Good afternoon! I have Apache w/php

Re: [PHP-DB] mysql_connect error

2003-06-10 Thread Sparky Kopetzky
Says right here from phpinfo under configure command: '--with-mysql=shared,/usr' So it HAS to be in there... Robin - Original Message - From: CPT John W. Holmes [EMAIL PROTECTED] To: Sparky Kopetzky [EMAIL PROTECTED]; PHP DB Group [EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 13:48

Re: [PHP-DB] mysql_connect error

2003-06-10 Thread Rasmus Lerdorf
You have to load the extension in your php.ini file. eg. extension=mysql.so -Rasmus On Tue, 10 Jun 2003, Sparky Kopetzky wrote: Good afternoon! I have Apache w/php installed on one server. I have mysql installed on a windows machine. I keep getting this error 'Call to undefined

[PHP-DB] Execute a mySql sript file directly from PHP

2003-06-10 Thread Gustavo Del Castillo Meza
Hi, I need to execute a very large script file on my hosting server, i dont have shell access and the file is too large to execute using phpMyAdmin. I wonder if i could upload the file by FTP and then execute it with a php script directly, without opening the file and go thru every line.

Re: [PHP-DB] Execute a mySql sript file directly from PHP

2003-06-10 Thread Jason Wong
On Wednesday 11 June 2003 04:21, Gustavo Del Castillo Meza wrote: I need to execute a very large script file on my hosting server, i dont have shell access and the file is too large to execute using phpMyAdmin. I wonder if i could upload the file by FTP and then execute it with a php

[PHP-DB] Date Formatting in PHP

2003-06-10 Thread David Shugarts
I have a simple need to reformat a variable coming in as $DatePick, brought forward from a MySQL select in the format: 2003-11-18 I need to convert it to the format November 18, 2003 I am trying to avoid having to mess with the MySQL select statement, as the output is being passed

Re: [PHP-DB] Date Formatting in PHP

2003-06-10 Thread Frank Keessen
Hi David, Try this one: ? function formatDate($val) { setlocale (LC_ALL, ''); $arr = explode(-, $val); return strftime (%A %e %B %Y, mktime (0, 0, 0, $arr[1], $arr[2], $arr[0])); } echo formatDate($DatePick); ? Regards, Frank - Original Message - From: David Shugarts [EMAIL

Re: [PHP-DB] Date Formatting in PHP

2003-06-10 Thread John R Wunderly
At 05:23 PM 6/10/2003 -0400, David Shugarts wrote: I have a simple need to reformat a variable coming in as $DatePick, brought forward from a MySQL select in the format: 2003-11-18 I need to convert it to the format November 18, 2003 try the dice-n-slice method. use substr and

Re: [PHP-DB] Date Formatting in PHP

2003-06-10 Thread CPT John W. Holmes
I have a simple need to reformat a variable coming in as $DatePick, brought forward from a MySQL select in the format: 2003-11-18 I need to convert it to the format November 18, 2003 $f_date = date('F d, Y',strtotime($db_date)); ---John Holmes... -- PHP Database Mailing List

Re: [PHP-DB] MySQL CONNECTION PROblem

2003-06-10 Thread George Patterson
On Tue, 10 Jun 2003 16:47:26 +0300 nabil [EMAIL PROTECTED] wrote: but when i used mysql_error() i got : sorry database not found as my dbconnect.php file includes ? mysql_connect(192.168.0.111 , root , password) or die(SORRY CANNOT CONNECT) ; mysql_select_db(kt) or die(sorry database

[PHP-DB] Help Please!! Oracle/PHP connection

2003-06-10 Thread Y Al Hinai
Hey guys, I would really appriciate it if someone can direct me with this problem. On my laptop I have: Windows XP Professional, Oracle 9i Database, Oracle Client Software, PHP4.3.1, and Apache server. PHP and Apache work fine. Oracle i9 by itslef works fine too. However when i tried to

RE: [PHP-DB] Help Please!! Oracle/PHP connection

2003-06-10 Thread Matthew Moldvan
Have you tried the built in Oracle functions in PHP? http://us3.php.net/oracle oracle_logon() may be useful here ... Let me know if it works out for you. Regards, Matt. -Original Message- From: Y Al Hinai [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 8:03 PM To: [EMAIL

[PHP-DB] Re: Authentication Classes

2003-06-10 Thread Manuel Lemos
Hello, On 06/10/2003 01:10 PM, Becoming Digital wrote: I need an authentication class for an upcoming project so I took a trip over to the Repository. Unfortunately, the ratings system appears to be down (or no one uses it) and it's a bit difficult to determine which of the 40 offerings is best.

Re: [PHP-DB] Re: Authentication Classes

2003-06-10 Thread Becoming Digital
Sorry, Manuel, but you must have missed the first paragraph of my post. I was hoping to narrow down the 40 classes from the repository to those that are top quality. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: Manuel Lemos [EMAIL PROTECTED] To:

Re: [PHP-DB] Re: Authentication Classes

2003-06-10 Thread Manuel Lemos
Hello, On 06/10/2003 09:37 PM, Becoming Digital wrote: Sorry, Manuel, but you must have missed the first paragraph of my post. I was hoping to narrow down the 40 classes from the repository to those that are top quality. I know. There is a rating system in the site that would help you to find

[PHP-DB] T_String?

2003-06-10 Thread Jorge L.
I am getting the following error: Parse error: parse error, unexpected T_STRING in C:\Program Files\Apache Group\Apache2\htdocs\view.php on line 4 On line: $result = mysql_query(select * from guestbook) or die (mysql_error()); And I have no idea where the T_STRING is coming from. I know this is

Re: [PHP-DB] T_String?

2003-06-10 Thread Leif K-Brooks
The little detail is the lack of quotes around your query. Jorge L. wrote: I am getting the following error: Parse error: parse error, unexpected T_STRING in C:\Program Files\Apache Group\Apache2\htdocs\view.php on line 4 On line: $result = mysql_query(select * from guestbook) or die

Re: [PHP-DB] Date Formatting in PHP

2003-06-10 Thread David Shugarts
This worked perfectly, is very simple for me to use, and I would never have come upon it in 10,000 years of trying. Thanks! Thanks also to everyone who offered ideas. $f_date = date('F d, Y',strtotime($db_date)); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] Now, how about Roman Numerals?

2003-06-10 Thread David Shugarts
Second poser today: How to use either a MySQL select statement or PHP to produce a roman numeral, starting from an arabic (INT) number in a database? TIA Dave Shugarts -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Re: Authentication Classes

2003-06-10 Thread olinux
the pear LiveUser project is a pretty cool package. it offers a couple different levels of permissioning and options for authentication. If you use pear you should be able to get the examples setup in @ 15minutes. if not, pear install is rather simple. LiveUser project page

Re: [PHP-DB] Now, how about Roman Numerals?

2003-06-10 Thread Becoming Digital
With a rather complex class. There is no built-in function for developing roman numerals from their arabic counterparts, nor is there anything in the Classes Repository. Perhaps you can be the first to develop one. :) Edward Dudlik Becoming Digital www.becomingdigital.com - Original

Re: [PHP-DB] Re: Authentication Classes

2003-06-10 Thread Becoming Digital
What you may want to do is to go in the pages of each of the classes that from the descriptions seem to do what you want. Then you can check which are the most popular checking their downloads ranking in their pages. That's not a bad idea. I was, admittedly, hoping to avoid that, but it was

Re: [PHP-DB] Re: Authentication Classes

2003-06-10 Thread Manuel Lemos
Hello, On 06/11/2003 12:33 AM, Becoming Digital wrote: What you may want to do is to go in the pages of each of the classes that from the descriptions seem to do what you want. Then you can check which are the most popular checking their downloads ranking in their pages. That's not a bad idea.

Re: [PHP-DB] Re: Authentication Classes

2003-06-10 Thread Becoming Digital
Thanks to everyone who's tried to help me with this. I think I'm on the right track now. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: Manuel Lemos [EMAIL PROTECTED] To: Becoming Digital [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, 10 June,

[PHP-DB] Re: Now, how about Roman Numerals?

2003-06-10 Thread Hugh Bothwell
David Shugarts [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Second poser today: How to use either a MySQL select statement or PHP to produce a roman numeral, starting from an arabic (INT) number in a database? In PHP: function RomanDigit($dig, $one, $five, $ten) {

Re: [PHP-DB] Re: Now, how about Roman Numerals?

2003-06-10 Thread Becoming Digital
Very nice work, Hugh. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: Hugh Bothwell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, 11 June, 2003 00:55 Subject: [PHP-DB] Re: Now, how about Roman Numerals? David Shugarts [EMAIL PROTECTED]