Re: [PHP-DB] Undefined pg_prepare() in 5.6.1

2006-10-31 Thread Chris
Steve Mathias wrote: Chris == Chris [EMAIL PROTECTED] writes: Chris Steve Mathias wrote: Hello, The following code: ?php // Connect to a database named mary $dbconn = pg_connect(host=localhost port=5432 dbname=test user=test password=test); if(!$dbconn) { echo Unable to connect to test

Re: [PHP-DB] Can't Connect to MySQL local Server

2006-10-30 Thread Chris
might be. That will print out the commands that the file is running. Chris [EMAIL PROTECTED] 10/29/2006 4:34 PM ROGER DEBRY wrote: skip-networking is uncommented in the [mysqld] section of my.cnf I did discover something interesting this morning. When starting the MySQL server

Re: [PHP-DB] Can't Connect to MySQL local Server

2006-10-29 Thread Chris
ROGER DEBRY wrote: skip-networking is uncommented in the [mysqld] section of my.cnf I did discover something interesting this morning. When starting the MySQL server with mysqld_safe, I cannot connect to the server with my php script. However, I started the server this morning with

Re: [PHP-DB] use of undefined constant

2006-10-26 Thread Chris
Zbigniew Szalbot wrote: Hello, I am using PHP 5.1.6 (cli) and MySQL 5.1.11-beta on a FreeBSD 6.1 stable release. I am trying to make a custom database program work in this environment. I have it working under MS Windows XP Pro with MySQL 5.0.19-nt and php 4.3.10. It seems everything is in

Re: [PHP-DB] use of undefined constant

2006-10-26 Thread Chris
Zbigniew Szalbot wrote: Hello again, On Thu, 26 Oct 2006, Chris wrote: In the error log I can see this: Use of undefined constant is_admin - assumed 'is_admin' in /path_to_file. I bet you have something like: $GLOBALS[is_admin] You need quotes around that, or else (as you've seen) php

Re: [PHP-DB] use of undefined constant

2006-10-26 Thread Chris
Zbigniew Szalbot wrote: Hello again, On Thu, 26 Oct 2006, Chris wrote: You'll need to change: $PHP_AUTH_USER to $_SERVER['PHP_AUTH_USER'] and $PHP_AUTH_PW to $_SERVER['PHP_AUTH_PW'] The former variables are ok before 4.2.0 (where register_globals was off by default I think) but now

Re: [PHP-DB] Can't Connect to MySQL local Server

2006-10-26 Thread Chris
ROGER DEBRY wrote: Janet and Miles, Thank you for your suggestions. Here is more information for you. I am running: Fedora core 5 Linux php 5.14 apache 2.2.2 mysql 5.0.22 I have added the mysql_error code to my script as you suggested. I already knew the what the error was by

Re: [PHP-DB] Problem with pg_fetch_array

2006-10-23 Thread Chris
Vignesh M P N wrote: Hi I am trying to display the rows from a database table in a grid. I retrieved the results using pg_query() with a Select command. pg_query() returns true. But when I pass the results $rows to pg_fetch_array(), it returns false. I even tried displaying the

Re: [PHP-DB] Problem with Oracle

2006-10-23 Thread Chris
Rosen wrote: Hi, I have a problem with PHP and Oracle 10 Database. I read sql script from file and execute it. Files are something like this: insert into pts (pid, txt) values (1,'502a'); insert into pts (pid, txt) values (2,'502b'); . I receive a message: ORA-00911: invalid character When

Re: [PHP-DB] Stored Procedures vs mysqli_multi_query

2006-10-22 Thread Chris
Iulian Manea wrote: Hey everybody, Here is my problem: i have to exectute multiple SELECT queries to the database, ad my question is how it would be how it would be faster: How are you going to check for errors or whether the queries worked? If you run multiple queries in the same

Re: [PHP-DB] barcode

2006-10-22 Thread Chris
Mad Unix wrote: I am in the process to create an online form using PHP with DB Oracle or MySQL, this form which consist of 2x parts personal data and finance data, and it will be filled by the users, once the form is filled and submitted , it will be saved to the system as reference and

Re: [PHP-DB] Compare columns

2006-10-19 Thread Chris
Peppe wrote: Hi guys, I really need some help. I have two tables tbl_question with 2 columns question_id , question_name and tbl_answers with 3 columns answer_id,answer_name and questionFK. I want to get values from question_id and compare them with questionFK if some values are missing in

Re: [PHP-DB] ORDER BY

2006-10-18 Thread Chris
Ron Piggott (PHP) wrote: Is it possible to do an ORDER BY column_a column_b ASC ? IE Can you specify two columns to cause the output to be displayed in a specific order? Ron Yes (a quick search would have told you this too). It's best to specify the order for each one: order by column_a

Re: [PHP-DB] Verifying syntax executed correctly

2006-10-17 Thread Chris
Ron Piggott (PHP) wrote: If I give this command through PHP to mySQL mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( Unable to select database); $query = UPDATE `table` SET `last_activity_field` = '$current_date' WHERE `reference` = '$account_reference' LIMIT

Re: [PHP-DB] urgent: Trying to get COUNT for fairly elaborate query

2006-10-16 Thread Chris
sneakyimp wrote: The original query results (minus most of the fields but including the COUNT(esa.id) part) would look something like this: id title subcat_count 60 Another Halloween Party 4 50 Satan's Midnight October Bash 1 61 Halloween IPN Testing party 1 19 test 1 64 I happen more

Re: [PHP-DB] urgent: Trying to get COUNT for fairly elaborate query

2006-10-15 Thread Chris
sneakyimp wrote: See this query? I need a separate query that will return ONLY the total record count that it would come up with. I've tried replacing the select part with COUNT() but I still get a series of records in my return result. I just need ONE return value -- the total COUNT of rows

Re: [PHP-DB] Re: Help! With MySQL CASE problem

2006-10-15 Thread Chris
Andrew Darby wrote: Good people of php-db, I think I have this solved. For those keeping score, repeating the CASE condition in the ORDER BY seems to work, i.e., SELECT DISTINCT e.exhibition_id, e.title, e.begin_date, CASE 'heading' WHEN UNIX_TIMESTAMP( ) = e.begin_date THEN 'Coming Up' ELSE

Re: [PHP-DB] urgent: Trying to get COUNT for fairly elaborate query

2006-10-15 Thread Chris
sneakyimp wrote: chris smith-9 wrote: Doing this is actually rather easy. Replace this: SELECT e.id, e.title, e.subheading, eta.start_timestamp, eta.end_timestamp, e.zip, e.bold, e.outline, e.color, e.subheading, COUNT(esa.id) AS subcat_count With: SELECT COUNT(e.id) AS count Or am I

Re: [PHP-DB] urgent: Trying to get COUNT for fairly elaborate query

2006-10-15 Thread Chris
sneakyimp wrote: chris smith-9 wrote: Ah - that would be the group by doing that. Removing those: GROUP BY eta.id ORDER BY subcat_count DESC, eta.id Does that get you what you want? If it gives you one result - make sure it's right. Change a few id's, make sure they match up to what your

Re: [PHP-DB] month

2006-10-15 Thread Chris
Ron Piggott (PHP) wrote: Is there a slick and easy way to convert January to 01 ? (and February to 02, etc) Ron You asked this on the general list and got a few responses. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To

Re: [PHP-DB] big problem with PhPBB and PHP

2006-10-12 Thread Chris
jamesbond wrote: Hi, I'm trying to install PhPBB on a FreeBSD box, and am having problems. The PhP version is 5.1.6, and when I try to install PhPBB, it tells me that it can't use my database, which is PostgreSQL 8.1.4. But PostgreSQL IS listed in the little drop-down menu. I believe that my

Re: [PHP-DB] Oracle Stored Procedures

2006-10-11 Thread Chris
PLS-00553: character set name is not recognized ORA-06550: line 0, The error message gives you a lot of detail. Does this work ok if you don't do it through php but directly through oracle? -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List

Re: [PHP-DB] EXISTS syntax for SELECT INTO?

2006-10-11 Thread Chris
Tony Grimes wrote: I have a script that creates a table copy using SELECT INTO, but I want it to check if the new table already exists first. Does SQL support the EXISTS keyword for SELECT INTO statements (I'm running PG7)? If not, is there another way to do it in SQL? I'd rather not do it

Re: [PHP-DB] mysqli auto rollback on script termination

2006-10-09 Thread Chris
Martin Koch Andersen wrote: Chris skrev: It should be rolled back when a connection is lost or a transaction isn't explicitly committed. Can you find documentation on this specific issue anywhere? I think the same as you, but I find it odd, it is not documented. Reason I'm asking is, I've

Re: [PHP-DB] mysqli auto rollback on script termination

2006-10-08 Thread Chris
Martin Koch Andersen wrote: Hi, In case the PHP script dies (from fatal error, die() or similar), is any started transaction (BEGIN TRANSACTION) automatically rolled back (ROLLBACK) by PHP then? It should be rolled back when a connection is lost or a transaction isn't explicitly committed.

Re: [PHP-DB] Files uploaded through a form

2006-10-08 Thread Chris
Ron Piggott (PHP) wrote: The way my web hosting server was configured is that files uploaded through a web form to be processed by PHP are owned by 'www'. I am wondering if I am able to change the owner of the file to my ftp user name before I use the move_uploaded_file command to the directory

Re: [PHP-DB] two versions of php on same box, on has mysql support the other can't find it?

2006-10-08 Thread Chris
Eddie Peloke wrote: I have two php versions on one server. One of them has mysql support, the other has mssql support and is used to run scripts via the comand line. I am trying now to compile in mysql support to the command line one and I keep getting: configure: error: Cannot find MySQL

Re: [PHP-DB] $_SERVER

2006-09-27 Thread Chris
Ron Piggott (PHP) wrote: Is there a predefined variable that will tell me the resolution of the browser that is looking at my site? You have to do this through javascript, php can't capture that information. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing

Re: [PHP-DB] list field from .dbf

2006-09-27 Thread Chris
Rafael Ramdhani wrote: Dear All, i need convert my data from .dbf ( visual foxpro ) to mysql database first at all i open .dbf and list the field some error with function dbase_get_record it's not support list field ( memo type ) my list data have lost where field type is memo may help me

Re: [PHP-DB] Oracle talk to MySQL

2006-09-25 Thread Chris
David Skyers wrote: Hi Guys, Does anyone know how to make Oracle talk to MySQL? I have data in a MySQL database that I need to get into a Oracle database. You're going to need a middle layer like php or python that can talk to both. -- Postgresql php tutorials

Re: [PHP-DB] local queries vs remote queries

2006-09-20 Thread Chris
Stuart Kendrick wrote: hi chris, right. if i run 'psql -d soma' and then type the first SELECT, i get results ... if i type the second SELECT, i get zero rows. this seemed odd to me ... i wouldn't think that postgres would care. but perhaps it does hmm. ok, i just tried this again

Re: [PHP-DB] stable versions of AMP components

2006-09-20 Thread Chris
James Tu wrote: Hi: The production environment will most likely live on a Linux machine. My dev environment will be on OS X. What is the most stable versions of the AMP components should I can install? I'm guessing AMP means apache mysql php ? Use whatever is the latest version of each

Re: FW: [PHP-DB] How to install PHP-DEV package for PDO_OCI

2006-09-19 Thread Chris
Choy, Wai Yew wrote: Hi Chris, I did not install via RPM... I install thru' compiling the source (configure; make;make install..etc) Thanks.. So you don't need php-devel. Maybe you need to tell pear where php is installed - where did you install it (eg /usr/local/php) ? -- Postgresql

Re: FW: [PHP-DB] How to install PHP-DEV package for PDO_OCI

2006-09-19 Thread Chris
Choy, Wai Yew wrote: Hi Chris, Apologies if I ask silly question... But how do I install php-devel using pear? Yes, my php is install in /usr/local/php ... Note: My network have a proxy server...Should I export the http_proxy enviroment before I use pear? You don't need to install php

Re: [PHP-DB] php_mysql not loaded under Apache but is there in CLI?

2006-09-19 Thread Chris
theBrem wrote: All, I'm new to this news group - so apologies if I blunder. I've just installed Apache2, MySQL and php (5.1.6) under Windows XP (haven't tried this under Linux yet). When I access via Apache as http://localhost/info.php there is no MySQL support - and testing it further I

Re: [PHP-DB] local queries vs remote queries

2006-09-18 Thread Chris
Stuart Kendrick wrote: hi, i'm looking for trouble-shooting pointers, particularly around how to debug query results on one host, i have a PHP reporting tool querying a PostGres back-end. Recently (i must have changed something ... but ... i don't remember even logging into this box recently,

Re: FW: [PHP-DB] How to install PHP-DEV package for PDO_OCI

2006-09-18 Thread Chris
Choy, Wai Yew wrote: Dear all, Not sure can someone shed some light on my problem... Thanks.. -Original Message- From: Choy, Wai Yew [mailto:[EMAIL PROTECTED] Sent: Monday, 18 September 2006 9:05 AM To: Tom Atkinson; php-db@lists.php.net Subject: RE: FW: [PHP-DB] How to install

Re: [PHP-DB] Call Function On Session Destroy

2006-09-18 Thread Chris
Manoj Singh wrote: Hi Guys, I have a question. Is it possible to call any function when the session expires in PHP? I want to do some database deletions whenever the session expires. You need to set your own session handlers: http://php.net/session_set_save_handler Then you can do whatever

Re: FW: [PHP-DB] How to install PHP-DEV package for PDO_OCI

2006-09-18 Thread Chris
Choy, Wai Yew wrote: I get PHP 5.16 from the php.net site...Can't find a php-devel for 5.1.6 http://www.php.net/downloads.php Where did you get the RPM's from? php.net does NOT give you rpm's. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List

Re: [PHP-DB] searching through a string

2006-09-17 Thread Chris
Ron Piggott (PHP) wrote: If $file_name includes the path /path/to/file/file_name.pdf is there anyway of searching from the right hand side to the left and getting the file name out the $file_name variable? The file name starts the character following the last / http://www.php.net/pathinfo

Re: [PHP-DB] PHP and MySQL on Windows causing severe slowdown

2006-09-10 Thread Chris
Diane wrote: I just switched a customer from one Windows host to another. The new host is a Windows only shop, and not overly familiar with MySQL and PHP. My customer has two PHP applications, both important to the site. Everything else is ASP or ASP.NET. When the new host installed PHP and

Re: [PHP-DB] tsearch2, PHP5 with Bidi + US-ASCII

2006-09-10 Thread Chris
Michelle Konzack wrote: Am 2006-09-08 06:53:10, schrieb Chris: You're using postgres aren't you ? If you copy/paste the query and run Yes ;-) considering tsearch was in the subject that was rather a silly question wasn't it ;) it through psql do you get results? This is what I have

Re: [PHP-DB] sql output to a multidimensional array

2006-09-07 Thread Chris
K.A.Bouton wrote: I need the output of my sql to be a multidimensional array as follows. chart [ 'chart_data' ] =3D array ( array ( , 2001, 2002, 2003, 2004 ), array ( AAA, 0, 10, 30, 63 ), array ( BBB, 100,

Re: [PHP-DB] tsearch2, PHP5 with Bidi + US-ASCII

2006-09-07 Thread Chris
Michelle Konzack wrote: Hello Nerds, Geeks and Gurus, I have a multilingual Database of arround 380 to 390 GByte with data in environement 60 languages. the entired Database is INICODE. Since version 5, PHP is supporting UNICODE very nice, but whenever I want to search a bidi-string (farsi,

Re: [PHP-DB] sql output to a multidimensional array

2006-09-07 Thread Chris
Mitch Miller wrote: K.A.Bouton wrote: I need the output of my sql to be a multidimensional array as follows. then Chris wrote: You won't be able to get an sql query to return in that format (I know what you're trying to do, I've used the same chart software). This is my MSSQL Server

Re: [PHP-DB] Distinct Partial Matches: RegExp

2006-08-30 Thread Chris
i'm not sure if it is possible to use regular expression in a sql query. can anyone comment on this? thanks. Mysql Postgres can. I'm sure others can too. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] Strange problem!

2006-08-23 Thread Chris
Miguel Guirao wrote: Hello everybody out here and there, I'm experiencing a weird problem with one of my scripts, I'm using ob_start() in order to store the content of a web page in a string variable: $salida=ob_get_contents(); ob_end_flush(); $doc=$rmat..doc; $file=fopen($doc,w);

Re: [PHP-DB] In_Array in Query

2006-08-22 Thread Chris
Kevin Murphy wrote: I'm wondering if something like this is possible, where $array is an array. $query = select id from table where in_array(row,'$user_area'); Is it possible to see if the value of a particular row is in an array? I know I could create a loop where it would go through each

Re: [PHP-DB] Vexing Cookie Problem

2006-08-14 Thread Chris
Andrew Darby wrote: Hello, all. This is more of a php problem, but i'm not on the general list and um the cookie problem is part of a php/mysql application . . . . So, I have an application where university faculty can enter their publications in a scholarly database, but this data can also be

Re: [PHP-DB] SQL Server COM question

2006-08-08 Thread Chris
Todd Cary wrote: [Sorry - I misposted this in the General group] I am in the process of converting my clients PHP scripts that are using Firebird so they will work with SQL Server (their request; not mine). Is there a reference where I can get the COM Methods and Properties? The php

Re: [PHP-DB] SQL Server COM question

2006-08-08 Thread Chris
Todd Cary wrote: Chris wrote: Todd Cary wrote: [Sorry - I misposted this in the General group] I am in the process of converting my clients PHP scripts that are using Firebird so they will work with SQL Server (their request; not mine). Is there a reference where I can get the COM Methods

Re: [PHP-DB] php_oci8.dll

2006-07-27 Thread Chris
Marcos R. Cardoso wrote: I'm experiencing a disturbing problem with PHP 4.4.2, Win 2003 Server, Apache 2.0.58 and Oracle 9i. I've installed all the previously listed in a Web Server (though I've installed only the Net Client from Oracle 9i), but somehow there's a problem with the library

Re: [PHP-DB] Sigleton DB connection tripping on itself

2006-07-19 Thread Chris
Vandegrift, Ken wrote: Well, I have a situation where an Order object holds a collection of LineItem objects and of course they all use the same DB connection via a singleton. The Order object has a method that creates new LineItem objects from an ORDER_DTL table. Code snippet: // SET ORDER

Re: [PHP-DB] Sigleton DB connection tripping on itself

2006-07-18 Thread Chris
Vandegrift, Ken wrote: Good Day List, I have a singleton DB connection that I am trying to use throughout my application but It keeps tripping on itself. My main question is: If I am in the middle of a transaction can I prepare multiple statements eand execute them or will this cause an

Re: [PHP-DB] Interacting with server without a refresh?

2006-07-17 Thread Chris
Jeffrey wrote: This veers a bit from PHP, but is relevant. I am building an interactive workshop tool using php and mysql. I want the facilitator to be able to control which pages the participants see and to be able to control the data that appears on the page. The obvious way to do this

Re: [PHP-DB] DB2 - wrong number of parameters

2006-07-17 Thread Chris
Pablo Garay wrote: Hi! I´m working with PHP 5 and using the DB2 database. I´m trying to update a jpg file, that´s save on the database. here´s the code: $fp = @fopen($caminho/$nome_arquivo, 'r'); $content = fread($fp, filesize($caminho/$nome_arquivo)); $content =

Re: [PHP-DB] Remote DDTS server connection

2006-07-17 Thread Chris
Muthukumar wrote: Dear All, I am having an requirement as, Connect to remote machine and execute ddtssql binary to query DDTS oracle database and return data to local client using php. Why not use the native oracle libraries (http://www.php.net/manual/en/ref.oci8.php) or at least use an

Re: [PHP-DB] Re: posting information from a textarea

2006-07-06 Thread Chris
Dave W wrote: I saw this bug: http://bugs.php.net/bug.php?id=22427. Could this be related to problem I'm having? Simplify your example and test it, only way to know. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP-DB] Re: posting information from a textarea

2006-07-06 Thread Chris
Dave W wrote: I saw this bug: http://bugs.php.net/bug.php?id=22427. Could this be related to problem I'm having? Actually, show us the form you're trying to submit before doing anything else. Since we haven't seen any html or php code, guessing it's a bug is a bit of a stretch. --

Re: [PHP-DB] Taking care of an auto_increment field!

2006-07-06 Thread Chris
Is there a way to use transactios in MySQL?? Of course. They only work properly with innodb tables though. This is all in the mysql documentation (http://dev.mysql.com) Or maybe using a global variable accesed by all the processes running in the server? You could create a global

Re: [PHP-DB] Re: posting information from a textarea

2006-07-06 Thread Chris
Dave W wrote: I'll show you all the steps it passes through. Here's the form: form action=proc.php method=post fieldset label for=MottoMotto:/label input class=text type=text size=25 name=motto value=?php if($form-value(motto) == ){ echo

Re: [PHP-DB] Do while loop inside of mail()

2006-07-05 Thread Chris
Mark Bomgardner wrote: MySQL 4.1/PHP 4.2 I am trying to generate a email to send to people with a list of events happening through out the month. I am pulling the email addresses from the database with no problem, but when I put the list of events inside of the mail(), it barks at the do

Re: [PHP-DB] Uploading multiple files?

2006-07-04 Thread Chris
J R wrote: got curious of evans question. is there a way whithout having multiple input type=file ... form to upload multiple files. only one input field but when browse is click and the file selection window poped, multiple files can be selected at once and then uploaded. I was going to say

Re: [PHP-DB] Need Help Compiling PHP5 With MS SQL Support

2006-07-03 Thread Chris
Mike wrote: I am new to Linux and have NEVER compiled PHP. I have PHP 5 and need to compile it with MS SQL support. Per PHP docs, I installed FreeTDS and tested it and it works. Now I need to (re)compile PHP to get the support I need to access MS SQL databases. I am on a Ubuntu 6.06 version of

Re: [PHP-DB] splitting string from database

2006-07-03 Thread Chris
Dave W wrote: Hi, I am trying to take a number from a MySQL database and then split it into different strings using a comma. It's for display a cash amount into a table. It's stored in the database as something like 100 and I want for it to display as 1,000,000 on the table.

Re: [PHP-DB] Cron unlink

2006-07-02 Thread Chris
Ron Piggott (PHP) wrote: Does anyone have experience in getting unlink to work within the context of a cron? I created my own garbage collection function and I am trying to delete some session files through a cron that runs every 10 minutes. The session files are owned by 'www' The cron is ran

Re: [PHP-DB] LIMIT

2006-07-01 Thread chris smith
On 7/1/06, Dwight Altman [EMAIL PROTECTED] wrote: Thanks, but that's an additional query. I was wondering if there may be a PHP function that can operate on the $result or perhaps $link of the single query that uses a LIMIT clause and have the information [count(*) had there not been a LIMIT

Re: [PHP-DB] LIMIT

2006-06-30 Thread Chris
If you're using MySQL then: SELECT SQL_CALC_FOUND_ROWS * FROM aTable LIMIT 5 SELECT FOUND_ROWS() It's in the mysql documentation under SELECT syntax I believe. Chris Dwight Altman wrote: Is there a way to get the number of rows that would have been returned had there not been a LIMIT clause

Re: [PHP-DB] Conditional updating...

2006-06-25 Thread Chris
Grae Wolfe - PHP wrote: Thank you for the thought, however, I don't have a shell that I can run in, hence, I have to rely on help from others. something like phpmyadmin, phppgadmin will do. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List

Re: [PHP-DB] PDO and Exceptions

2006-06-21 Thread Chris
Vandegrift, Ken wrote: Good Afternoon, I have an instance of a PDO object set to throw a PDOException on errors. However, it does not appear to do this when a primary key violation error occurs on an insert sql statement. An exception should be thrown in this case correct? The insert

Re: [PHP-DB] how to get the referrer page details

2006-06-15 Thread Chris
[EMAIL PROTECTED] wrote: Hello all, I am developing a site in which user comes from different site to my site. Now i want to maintain that user comes from which site. I am using $_SERVER['HTTP_REFERER'] for that. Now i came to know that this variable is not supported by some servers or it

Re: [PHP-DB] Cant connect to postgresql 7.4 on FreeBSD

2006-06-10 Thread chris smith
On 6/9/06, Arie Nugraha [EMAIL PROTECTED] wrote: Hi list, yesterday i compile postgresql 7.4 in my FreeBSD 5.4 box. I manage to run the server smoothly without any problem. But then i try to connect with my php script with pg_connect function, and it returns an error like this : *cant make

Re: [PHP-DB] Select distinct field won't return distinct value

2006-06-06 Thread Chris
Blanton, Bob wrote: I'm just learning MySQL so don't know all the syntax. There is a LIST function in Sybase Adaptive Server Anywhere which would do that. Is there an equivalent function in MySQL? Query: SELECT distinct niin, list(serial_number) FROM fmds.maintenance_equipment group by niin

Re: [PHP-DB] php 5.1.4 and PostgreSQL 8.1.4

2006-06-05 Thread Chris
[EMAIL PROTECTED] wrote: I had php 5.1.4 on FreeBSD 5.4 with Apache 1.3.36 and PostgreSQL 8.0.8 for some time and all was OK. The last days I went to PostgreSQL 8.1.4 and since then the PGSQL extension crashes Apache, no matter what I do. I was going to ask if you compiled php yourself but

Re: [PHP-DB] SSL implementation

2006-06-03 Thread chris smith
On 6/3/06, Blanton, Bob [EMAIL PROTECTED] wrote: Hi, I'm new to web programming and Apache PHP so this may seem like a dumb question. Is there a preferred way to implement SSL in a website or web application? Is it handled using PHP or Apache? Or both? I see there is the Apache Open SSL

Re: [PHP-DB] Weird database entry

2006-05-29 Thread Chris
Mark Fellowes wrote: I checked my registration table recently and found 3 weird entries. First, this is where someone registers a username and password. The password is generated but encrypted , and an email link must be responded to activate the account , which these were not but it kind of

Re: [PHP-DB] mysql searching with fulltext indexing

2006-05-24 Thread Chris
Anyone have any idea how i can query the tables in order to get it to return the indexes show indexes from tablename; http://dev.mysql.com/doc/refman/5.0/en/show-index.html -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To

Re: [PHP-DB] PDF BLOB to Email

2006-05-11 Thread chris smith
On 5/11/06, Adrian Bruce [EMAIL PROTECTED] wrote: Hi I have pdf's stored as a blob in a MySQL database, how can i set a script (PHP obviously!) to email these blobs as pdf files. The only way i can think of at the moment is to write them to disk and then attach them to the mail before sending

Re: [PHP-DB] Sending filing attachments using PHP

2006-05-11 Thread Chris
JupiterHost.Net wrote: Ing. Edwin Cruz wrote: Have a look on this: http://framework.zend.com/manual/en/zend.mail.attachments.html It seems to be easy with zend framework How about a way to do it without having to install a huge system wide binary and configruation that might

Re: [PHP-DB] help in sql - postgresql

2006-05-02 Thread Chris
suad wrote: Hi, I need some help in sql - postgresql: snip Yay a postgres question! :D hee hee *The question is* : how can I force that the result of the col payed to be zerro 0 insted of nothing (NULL) and the order will be in way that the zerro's values comes first. and the result will

Re: [PHP-DB] auto_increment

2006-05-01 Thread chris smith
On 5/1/06, Ron Piggott (PHP) [EMAIL PROTECTED] wrote: I am using mySQL .. a google search for mysql reset auto_increment reveals the answer! -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] Eliminating character sets from DB entry

2006-04-30 Thread Chris Payne
Hi there everyone, Is there a way to allow Only English character sets in database entry with MySQL and PHP? I'm getting an awful lot of SPAM which is in Chinese/Japanese and i'd love to be able to block these charactersets from being inserted into my databases. Chris

Re: [PHP-DB] multi-table insert

2006-04-30 Thread Chris
Eustace wrote: Hello everybody! I am very much a newbie in PHP, but enjoying the learning process. Here and there I get tangled in the logic of certain problems. Anyway, I have a database about interns and this database has multi-tables told data of interns, for example personal information,

Re: [PHP-DB] Sheduled task for Php-MySql script

2006-04-25 Thread chris smith
I have some php scripts that i have to run automatically at 5.00am (on Windows platform). I am using MySql. I've tried using Scheduled Task and Cron, and i converted the extension files to .bat format. But always error on functions mysql_connect,mysql_query,and other DBS functions. I don't

Re: [PHP-DB] MD5, MySQL, and salts

2006-04-18 Thread chris smith
On 4/18/06, Giff Hammar [EMAIL PROTECTED] wrote: For an example, look at how UNIX/Linux stores regular login passwords. In short, the salt is the first two characters in the password. When comparing passwords, you take the salt and the user supplied password, encrypt, then compare the two

Re: [PHP-DB] MD5, MySQL, and salts

2006-04-17 Thread chris smith
On 4/18/06, Sean Mumford [EMAIL PROTECTED] wrote: Hi Guys, I'm working on securing user passwords in a MySQL 4 database with a PHP5 frontend. I remember being told in one of my classes (I'm currently a college junior) that the best way would be to hash a salt and the password together and

Re: [PHP-DB] Insert select Blob field from MySQL

2006-04-15 Thread chris smith
On 4/15/06, Robert [EMAIL PROTECTED] wrote: Does anyone have an example of how to insert and select a blob field in a MySQL 4.1 database ? Search google for php mysql blob it will give you tons of results (link is too long to post). First 3 results are articles on exactly what you want. --

Re: [PHP-DB] Question regarding the scope of pg_prepare

2006-04-14 Thread chris smith
On 4/14/06, Will Chapman [EMAIL PROTECTED] wrote: I have a few different pg_prepare statements in my PHP script. I was wondering what scope they lie in. Im assuming they are not saved in the PSQL database, so it is just for the script? They are inside of functions... does it only last until

[PHP-DB] listing question

2006-04-11 Thread Chris Payne
? So if they have 0 upwards they displays from the top, then the ones that do not have ANYTHING in that field would display after but alphabetically instead? I'm kind of lost on how to do this with a single query. Thanks everyone Chris

RE: [PHP-DB] listing question

2006-04-11 Thread Chris Payne
and then LAST it displays the videos with numbers, and when I can get the numbers at the top of the listing, they are in the wrong order (IE: 0,1,2 is from the bottom up and not 0 being at the top, 1 being next and so on). Chris Is there something stopping you from specifying two columns to order results

Re: [PHP-DB] grabbing data and auto email set users

2006-04-11 Thread Chris
JeRRy wrote: Okay here is the full code. Now I got this code off a friend! In this first section to display the data that is grabbed from the db. ?php $db = mysql_connect(localhost, user, pass); mysql_select_db(db_select,$db); $result = mysql_query(SELECT `nickname` FROM

Re: [PHP-DB] listing question

2006-04-11 Thread Chris
Chris Payne wrote: Hi there, I tried something similar: $query = SELECT * FROM videos WHERE videomakers_website_url = '$x' AND privatepublic = 'public' AND producer_website LIKE '%$x%' OR videomakers_website_url LIKE '%$x%' ORDER BY videomakers_site_position ASC, video_title ASC LIMIT $offset

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread Chris
JeRRy wrote: Hi, Okay I played with the code a bit and ended up with this, it does NOT produce errors but it's not doing anything. Connects to the db but does not do the mail out. Maybe I missed something said before, but here you go, the link below with the code. (it's probably basic)

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread Chris
JeRRy wrote: Hi, Okay I played with the code a bit and ended up with this, it does NOT produce errors but it's not doing anything. Connects to the db but does not do the mail out. Maybe I missed something said before, but here you go, the link below with the code. (it's probably basic)

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread Chris
JeRRy wrote: Okay, but still not working... is NULL the same as ' '? Or does NULL have to be the inserted value in the db? Null means unknown - so completely different to ' ' or ''. How was your table created? What do you get if you run that query through phpmyadmin: select username

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread Chris
JeRRy wrote: Hi, Ahh okay I thought NULL was blank. Okay I understand, therefore, hehe, I fixed it. snip $query = select username from round3 where misc=''; fixed it, the email got sent. Had to change a few strings also to match my database which I was not aware of. Forgot it

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread Chris
JeRRy wrote: Okay I have the emails to work now, thanks so much Chris. But now I have encountered another problem, I hope you don't mind helping, I am obviously missing again something basic. Basic than before. I have this code: $result = mysql_query(SELECT `nickname` FROM tipping WHERE

Re: [PHP-DB] grabbing data and auto email set users

2006-04-09 Thread Chris
JeRRy wrote: Hi, No code here unless required. I run this tipping site. All user details are in a table called tipping which stores their id, username, password, email address, score and others. Than I have tables round 1 through to round 22. (all seperate tables) This

Re: [PHP-DB] grabbing data and auto email set users

2006-04-09 Thread Chris
JeRRy wrote: Hi, I used the following but got this error: *Fatal error*: Call to undefined function: db_fetch() in */home/tassie/public_html/tipping/admin/check.php* on line *7* As I said: db_query will depend on your database (ie mysql_query or pg_query or

Re: [PHP-DB] grabbing data and auto email set users

2006-04-09 Thread Chris
JeRRy wrote: Hi, Okay I must be missing something here. I changed it to mysql_query and no errors produce however no emails are sent either. After cross-checking back and fourth with my db the entries are correct. A connection is made and establlished. maybe I need to place some eror

<    2   3   4   5   6   7   8   9   10   11   >