Re: [PHP-DB] Date problem

2007-01-21 Thread Miles Thompson
. Nonetheless, this should set you on the right road. It would also have helped your diagnosis if you echoed your SQL statement. Cheers - Miles Thompson -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.410 / Virus Database: 268.17.3/642 - Release Date: 1/20

RE: [PHP-DB] Login script help

2006-12-21 Thread Miles Thompson
When user has authenticated successfully, start a session with an authentication key - almost anything you want. After that, any page you want to protect you just put one line at the top to check for the presence of this value; redirect to login page if it's not there. Regards - Miles

Re: [PHP-DB] Can't Connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

2006-10-24 Thread Miles Thompson
At 05:15 PM 10/24/2006, ROGER DEBRY wrote: I know that this is a common problem, and I have honestly searched though many forums, faqs, and mailing list archives for an answer. I get this message when trying to connect to a local MySQL database with the statement $db =

Re: [PHP-DB] Displaying a PDF file

2006-09-14 Thread Miles Thompson
At 09:33 AM 9/14/2006, Ron Piggott (PHP) wrote: I am creating a submit button on the fly. The purpose of this is to open up a new browser window and then display the contents of a PDF file. The code for this button reads: input type='button' value='Psalm 91'

Re: [PHP-DB] Can you recommend Australian LAMP web hosting service?

2006-08-10 Thread Miles Thompson
At 04:42 AM 8/10/2006, Jeffrey wrote: Sorry, this is a bit off topic, but you are the best people to ask. I am looking for a web hosting service based in Australia (and with servers in Australia). Need Linux+Apache+MySQL+PHP and dedicated server hosting. Importantly, they must provide a very

Re: [PHP-DB] Parse Problem

2006-05-09 Thread Miles Thompson
example, neither is PRODUCT ITEM ... are you sure the XML is well-formed? And now we don't want a sig like yours. Could you please shorten it? Regards - Miles Thompson -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.392 / Virus Database: 268.5.5/334 - Release

Re: [PHP-DB] optimizing indexes -mysql

2006-05-04 Thread Miles Thompson
a question that should be asked on a list dedicated to MySQL. Regards - Miles Thompson -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.392 / Virus Database: 268.5.3/331 - Release Date: 5/3/2006 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP-DB] Using OR in a SELECT statement

2006-03-28 Thread Miles Thompson
At 02:40 AM 3/28/2006, Arno Kuhl wrote: Newbie MySQL question... I have a situation where if I don't have a custom value then I must use the default value. There will always be a default value but there may also be a custom value. I could do this with: select value where id and custom

RE: [PHP-DB] Remove newlines from field

2006-03-20 Thread Miles Thompson
tops snipped At 04:00 PM 3/20/2006, you wrote: I am using a PHP script to pull information from a FoxPro database via ODBC. One of the fields is a memo field (large text) that contains newline characters. Displaying this info to the web page is fine as the newlines are ignored. The challenge

RE: [PHP-DB] Remove newlines from field

2006-03-20 Thread Miles Thompson
At 07:17 PM 3/20/2006, Miles Thompson wrote: tops snipped Forgot to add that the writers work in WP 5.2 for Windows, because it has an excellent indexing function which enables them to locate back stories v. quickly. That text is cut and pasted into an HTML textarea, which is saved

Re: [PHP-DB] WAMP

2006-03-15 Thread Miles Thompson
No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re:

2006-03-11 Thread Miles Thompson
At 11:43 PM 3/10/2006, Ron Piggott (PHP) wrote: X-Spam-Scan: YES X-Spam-Flag: NO X-Spam-Level: / X-Spam-Score: 0.0 (0) X-Spam-Report: score=0.0 stars= tests=UNPARSEABLE_RELAY=0.001 X-Virus-Scan: YES X-Headers-End: 1FHupX-MO-JB X-Delivered-To: [EMAIL PROTECTED] Subject: [PHP-DB] unescape a

RE: [PHP-DB] Help needed creating a social network

2006-03-07 Thread Miles Thompson
- Miles Thompson At 03:19 PM 3/7/2006, Daevid Vincent wrote: Thanks for the reply. However, that only gives me a single degree. I'm looking for the way to traverse a 'tree' to see who is in your extended networks, so I can do things like: You are 4 degrees away from Sam: You know bob who knows

[PHP-DB] Data split: web local machine

2006-02-20 Thread Miles Thompson
will be welcomed. Regards - Miles Thompson -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 2/17/2006 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] generating random id's

2006-02-09 Thread Miles Thompson
At 03:26 AM 2/9/2006, JeRRy wrote: Just to let you all know I used PHP's unique ID generator to generate a unique id for tracking purposes. I than md5 it hide the format a bit, would this be enough? Or can be easily worked out also? Need it pretty tight and keeping the likelyhood down

Re: [PHP-DB] Performance question

2006-02-01 Thread Miles Thompson
Don't cross post!! MT At 11:46 AM 2/1/2006, Mathieu Dumoulin wrote: This is more a How would you do it than a How can i do it question. Didn't have time to try it, but i want to know how mysql_seek_row acts with large result sets. For example im thinking of building a node tree

Re: [PHP-DB] general rule for when to perform an operation in either Mysql or php

2006-01-29 Thread Miles Thompson
At 12:20 PM 1/29/2006, daniel smith wrote: I am playing around with Mysql and php and I am not sure about when it is best do something in mysql or php when BOTH can perform the operation. Example, date formating can be performed by Mysql during the query DATE_FORMAT(blah, blah...) or by php

Re: [PHP-DB] Table sorting problem - further thought

2006-01-13 Thread Miles Thompson
At 10:16 PM 1/12/2006, Miles Thompson wrote: At 05:51 PM 1/12/2006, Charles River wrote: I am a novice in both PHP and MySQL, otherwise I would be able to do this myself. :-) A non-profit I assist has a table (http://www.lbc4cc.org/04-05board.php) that is displayed by a simple PHP script

Re: [PHP-DB] Table sorting problem

2006-01-12 Thread Miles Thompson
AND lBoardMbr != 0 ORDER BY num_rank, last_name Advantage? Data more closely approaches 3rd normal form, no redundancy, no errors when retyping, etc. Long answer - hope it's been helpful. Regards - Miles Thompson PS If this is pedantic, and you know how to do all

Re: [PHP-DB] inserting due date into database

2006-01-04 Thread Miles Thompson
to datetype. Regards, Ruprecht And to add to the discussion, why would you want to do such a thing? Calculate it when retrieving the data. It's similar to storing a person's age when you have the date of birth. Regards - Miles Thompson -- No virus found in this outgoing message. Checked by AVG

Re: [PHP-DB] Ending session

2005-12-09 Thread Miles Thompson
At 05:30 PM 12/9/2005, Ron Piggott (PHP) wrote: How do you actually end $_session variables so the session actually ends? I found the session_write_close() command. I am not sure if this is the correct command or not. One prime example I am using is a $_session variable to track which user

Re: [PHP-DB] connect vs pconnect

2005-12-08 Thread Miles Thompson
Read the comments following the formal description at http://www.php.ca/mysql_pconnect They're pretty illuminating, and probably resulted from hard-earned experience. Miles At 11:47 AM 12/8/2005, Benjamin Adams wrote: I'm trying to figure out if running mysql_connect or mysql_pconnect would

Re: [PHP-DB] Sending multiple items via a single form field

2005-11-14 Thread Miles Thompson
); } echo centeremSelected Records deleted!/emp; } HTH -Miles Thompson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] text with html tags apeared in text area.

2005-10-28 Thread Miles Thompson
At 07:03 PM 10/28/2005, Mohamed Yusuf wrote: hi I have php form. one of my textarea gets data with html tags from database, so I would like to remove those html tags like br /, therefore is there anyway that i can remove those tags in the data and then the data can appear as text in the

Re: [PHP-DB] Convert String to Array

2005-09-30 Thread Miles Thompson
could have been avoided up front. On the other hand, I know nothing about your data or your application, o maybe I'm blowing smoke. Regards - Miles Thompson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] joining tables in postgres

2005-09-29 Thread Miles Thompson
At 04:13 PM 9/29/2005, redhat wrote: anyone know of any good tutorials on simple joining of tables in Postgres using PHP? I did some Googling and didn't find anything satisfactory. thanks, Doug -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] A question with php.ini

2005-09-21 Thread Miles Thompson
. It depends on whether you're installing on Linux/BSD or Windows. Somewhere in the online manual there's a parallel example. Miles Thompson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Getting Started..

2005-09-19 Thread Miles Thompson
-colon to terminate it. Why not try again, with just a single line file: ? phpinfo(); ? Once that works, then expand it. Regards - Miles Thompson At 08:37 PM 9/19/2005, Clint Lovell wrote: I'm just getting started here and I'm working with PHP MySQL for Dummies. The book says to write a simple

Re: [PHP-DB] Highlighting data selected from one table that appear in another

2005-09-01 Thread Miles Thompson
At 08:50 AM 9/1/2005, boclair wrote: Content-Type: multipart/alternative; boundary=070700030402040702060708 X-Authentication-Info: Submitted using SMTP AUTH PLAIN at omta05ps.mx.bigpond.com from [138.130.220.111] using ID boclair at Thu, 1 Sep 2005 11:49:59 + This is

Re: [PHP-DB] maximum number of records in a db?

2005-08-26 Thread Miles Thompson
At 12:11 PM 8/26/2005, Jordan Miller wrote: I was just wondering what is the maximum number of records that can be successfully handled with a db. any db will do. it doesn't have to be the fastest or best, just one that can hold the maximum number of records and still be able to interact well

Re: [PHP-DB] load data infile -- problem

2005-08-18 Thread Miles Thompson
I could be 100% wrong on this, but I do not think that a command line statement can be executed through mysql_query() - try exec(). If I remember correctly mysql load data infile ... is not executed from within mysql, but at the command line. (Hint: look at the source for phpMyAdmin and copy

Re: [PHP-DB] Re: oci_bind_by_name, 'Unknown or unsupported datatype given'

2005-08-10 Thread Miles Thompson
Anton, This seems so fundamental I hesitate to suggest it. Have you run a script with phpinfo() in it? Or apache or httpd with the -l, -V or -t switches? Miles At 06:59 AM 8/10/2005, Anton Channing wrote: Okay, its seems my problem is actually more fundamental. I've just tried to run the

Re: [PHP-DB] Re: oci_bind_by_name, 'Unknown or unsupported datatype given'

2005-08-10 Thread Miles Thompson
At 11:32 AM 8/10/2005, Anton Channing wrote: On 8/10/05, Miles Thompson [EMAIL PROTECTED] wrote: Anton, This seems so fundamental I hesitate to suggest it. Have you run a script with phpinfo() in it? Or apache or httpd with the -l, -V or -t switches? Miles Okay, have just run phpinfo

Re: [PHP-DB] Re: printing errors

2005-08-02 Thread Miles Thompson
David, Amen to that! Vowels do help, don't they? Started to read this thread, then thought Bah, if he doesn't care enough to help us understand his problem, why bother straining to understand this crap? Miles At 09:27 AM 8/2/2005, David Robley wrote: (umeed wrote: most of the time wen

Re: [PHP-DB] Duplicate record

2005-07-30 Thread Miles Thompson
has left the final field which must be unique, doing nothing if data is OK, putting up a flag if there was duplication. As for a unique ID for each record, i.e. one that autoincrements, that's almost always a good idea. Regards - Miles Thompson At 07:17 AM 7/30/2005, Hallvard wrote: I have

Re: [PHP-DB] auto-generating next id (in order) for an add script

2005-06-20 Thread Miles Thompson
Depending on your version of MySQL, table type should be MyISAM so that numbers for deleted articles do not get reused. Miles Thompson At 02:33 PM 6/20/2005, [EMAIL PROTECTED] wrote: Thanks Bastien, I am off to try the auto increment. I will post back if I cannot get it to work properly

Re: [PHP-DB] Mysql: LOCK TABLES

2005-05-01 Thread Miles Thompson
and stored, rather than fetched and displayed? Of course you've not described the data or the calculation, so my question may be out of line. Generally speaking, though, it's not a good idea to lock either rows or tables in Internet apps. Regards - Miles Thompson -- PHP Database Mailing List

Re: [PHP-DB] 'OR' logic in mySQL query

2005-04-17 Thread Miles Thompson
No - OR and AND tests work like this: (first conditional test) OR (second conditional test) therefore ((date_received LIKE '$todays_date) OR (date_received LIKE '$yesterdays_date')) And of course you will check the MySQL docs to confirm that OR does work in the WHERE clause, won't you?

Re: [PHP-DB] comprehensive sql tutorial

2005-03-28 Thread Miles Thompson
Yemi, Well, Joe Celko is a recognized expert; Googling for Joe Celko tutorial turned up 8,900 hits, but this link was found on the first page: http://www.codebox.8m.com/sql.htm Lots of stuff there. If you want books, The Practical SQL Handbook Bowman, Emerson and Darnovsky ISBN

Re: [PHP-DB] Re: Handling database calculations with a php page

2005-03-14 Thread Miles Thompson
That's the convention. You HAVE TO: - read and use the manual, the rest of us do - dig out and follow a tutorial on working with PHP and databases If you do not, you will have no real knowledge of what you're doing, only a piecemeal Someone said to do it this way. Do this BEFORE

Re: [PHP-DB] Re: Handling database calculations with a php page

2005-03-13 Thread Miles Thompson
First of all, check the SELECT statement in your database documentation, because you do this within your select. It is important you that you inform yourself about this, because you will use it a lot. So this is not really a PHP question. The statement is written something like this: SELECT

Re: [PHP-DB] Cannot connect to local server

2005-02-10 Thread Miles Thompson
New version of MySQL, old PHP? possible password encryption mis-match? Check out: http://dev.mysql.com/doc/mysql/en/old-client.html Regards - Miles At 06:33 AM 2/10/2005, Denis Gerasimov wrote: Hello, I am trying to connect to MySQL using $mysqli = new mysqli(example.com, user, pass, db);

Re: [PHP-DB] Programmer required

2005-02-02 Thread Miles Thompson
This is waaay off topic, but: I hope you mean retired, who will presumably work for less. Why would you want one who's not current? Just wondering - Miles At 09:47 AM 2/2/2005, ioannes wrote: I'm looking for a programmer, preferably in London or UK, who has been maybe out of work for a few years,

Re: [PHP-DB] Programmer required

2005-02-02 Thread Miles Thompson
At 11:10 AM 2/2/2005, Martin Norland wrote: Miles Thompson wrote: This is waaay off topic, but: I hope you mean retired, who will presumably work for less. Why would you want one who's not current? Just wondering - Miles At 09:47 AM 2/2/2005, ioannes wrote: I'm looking for a programmer, preferably

Re: [PHP-DB] Any recomendations on a report writer to use with MY-SQL

2005-01-25 Thread Miles Thompson
Any report writer that supports ODBC. As far as I know, there are no open source report writers like CR. (Gawd, I'd hope they'd be better; my relationship with CR is sort of love-hate.) Love it when the job's done, hate having to touch a working report because everything's binary when it

Re: [PHP-DB] is this a problem ?

2004-12-28 Thread Miles Thompson
with it and adapt it to your needs. However, why is your form's action parameter set to a string of hyphens? Regards - Miles Thompson At 09:25 AM 12/28/2004, amol patil wrote: hallo, i have changed file signup1.php with login1.php, in action fied of form form name=form1 method=POST action=-- and saved

Re: [PHP-DB] MYSQL

2004-12-22 Thread Miles Thompson
: maybe all the processing could be done in the SELECT statement, maybe some will have to be done after the results are returned. Regards - Miles Thompson At 12:42 AM 12/22/2004, Balwant Singh wrote: hi to all, may somebody guide me on the following: I want to retrieve data from MYSQL and then want

RE: [PHP-DB] mysql to access

2004-12-17 Thread Miles Thompson
Use ODBC to use MySQL from either Access or VB (or any other language!) MT At 12:25 PM 12/17/2004, Perry, Matthew (Fire Marshal's Office) wrote: Here is the problem: I am currently using MySQL and PHP for this application but have realized recently that the bulk of my work is setting up three

RE: [PHP-DB] PHP-HTML-select deny

2004-12-03 Thread Miles Thompson
Good suggestion Anna, that's what we do for AllNovaScotia.com, plus we add this bit of .css @media print { body { display: none; } } Then viewer can't print the page. We do this because only certain subscribers have printing privileges. Regards - Miles Thompson At 03:31 PM 12

Re: [PHP-DB] Database Design Recommendations

2004-11-02 Thread Miles Thompson
Eric, Your second approach is fine. It's denormalized, extensible, and can be manipulated using tools you put in place. You may want to consider groups as well, thus people belonging to a group could view/edit pages, that has the potential to save a lot of administrative scut work. A table

Re: [PHP-DB] which DB to use?

2004-10-01 Thread Miles Thompson
Check the MySQL docs - I *think* subqueries are supported in the latest version, but not triggers or stored procedures. But as I say, check. Alternatives? PostgreSQL or Firebird. HTH - Miles Thompson At 11:07 AM 10/1/2004, Matthew Perry wrote: Thank you very much for your help. If I had

Re: [PHP-DB] Mass mail

2004-09-20 Thread Miles Thompson
on his site. HTH - Miles Thompson At 10:18 AM 9/20/2004, nikos wrote: Hello list A client of mine sends thousands of mails as newsletters and wants as to make an Interface to admin this list. Its easy to put this mail list in a MySQL table and make the interface on PHP language and with mail

Re: [PHP-DB] Bug with assignment operator ( := )

2004-08-28 Thread Miles Thompson
+ StkhistMonthqty07 + StkhistMonthqty08) as total . . rest of statement ... . and total 0 Regards - Miles Thompson At 10:10 PM 8/28/2004, Ross Honniball wrote: SQL Statement: select *,@xtotal := StkhistMonthqty06 + StkhistMonthqty07 + StkhistMonthqty08 as total from StkMast as sm inner join StkHist

Re: [PHP-DB] Re: Help! WINXP/Apache2.0/PHP4.3.8 - Can't run PHP

2004-08-20 Thread Miles Thompson
it from your browser. If your configuration is correct you will see pages of information on your setup and configuration. If not, then it's back to the installation section of the fine manual. Regards - Miles Thompson PS Remember, PHP executes SERVER side, not client side. Don't treat it like

Re: [PHP-DB] Lock Record on Postgresql

2004-08-13 Thread Miles Thompson
Norma, Generally speaking issuing locks on records across the internet is not a good idea. Too many things can happen that could result in the record never being unlocked. Recognize the HTTP is stateless, that's one of its limitations, and work around that. Regards - Miles At 11:30 AM

Re: [PHP-DB] Lock Record on Postgresql

2004-08-13 Thread Miles Thompson
Torsten, Elegant! Miles At 02:03 PM 8/13/2004, Torsten Roehr wrote: Norma Ramirez [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks for answer Miles, I'm aware of what you wrote but have a little hope to find some way, and Robby what I'm trying to do is avoid the user for update

Re: [PHP-DB] Good books on sql / mysql

2004-08-11 Thread Miles Thompson
in print; they are both v. good and quite product-neutral references. Joe Celko also had a web site with a collection of articles he'd written for various magazines, don't know if it's still up.. Regards - Miles Thompson At 08:46 PM 8/10/2004, Ross Honniball wrote: Anyone recommend any really good

Re: [PHP-DB] Exporting Data From MySQL Using PHP

2004-08-07 Thread Miles Thompson
, but this one you'll have dealt with by then. Regards - Miles Thompson At 11:01 PM 8/6/2004, Ron Piggott wrote: I have created a MySQL database. The table I am creating is a subscriptions database. I want to be able to export all e-mail addresses stored in the e_mail column into a plain text

RE: [PHP-DB] SQL Insert problem

2004-08-05 Thread Miles Thompson
1. echo your $sql to make certain it's as sound as you think. 2. i don't see execution of the query: mysql_query( $sql) - you'll have to put the die() error after this function. Hth - mthompson At 12:05 PM 8/5/2004, Vincent Jordan wrote: I have inserted '$address2', correctly in the row however

Re: [PHP-DB] Re: Restrict account access to single user

2004-07-15 Thread Miles Thompson
published materials (.pdf's) you may take a good look at what Adobe calls, or used to call, Web Merchant, bite the bullet on the licensing and royalty fees, and reconcile yourself to a Windows / IIS solution. Cheers - Miles Thompson At 02:23 PM 7/15/2004, Tim Van Wassenhove wrote: In article [EMAIL

[PHP-DB] Re: [PHP] Best table structure

2004-06-30 Thread Miles Thompson
. Regards - Miles Thompson At 07:53 AM 6/30/2004, Tom Chubb wrote: Please can someone let me know their opinion on the following: I have written some code for submitting a top 20 music chart online. I use the following to insert into mysql: INSERT INTO chart (name, chartpos, artist, title, label) VALUES

Re: [PHP-DB] Using Cursors

2004-06-01 Thread Miles Thompson
At 11:12 AM 6/1/2004, Gerard Samuel wrote: A bit off topic, but lately I've been running into situations, where I have to know about using cursors with databases, like sql server, ibm db2 Can anyone point me to online resources that explains (to a practical newbie) cursors Thanks Gerard, Think

Re: [PHP-DB] Remove white space?

2004-04-22 Thread Miles Thompson
1. Don't cross-post! 2. Read the string functions in the php manual. You probably don't want to remove all white space, just trim. Have a look at http://ca3.php.net/manual/en/function.trim.php 3. You will find a function to do exactly what you want. Regards - Miles Thompson At 10:51 AM 4/22

Re: [PHP-DB] mssql insert

2004-03-28 Thread Miles Thompson
$query = INSERT INTO myTable VALUES ('.$myVar.');'; Check the commas? Miles At 05:50 PM 3/28/2004 +1200, Martin Ryan wrote: Got a dumb-ass question for you all. I have got insert queries working with mssql_query($query); except if any of the variables have two or more words. For example: $myVar =

Re: [PHP-DB] Impact of MySQL Queries

2004-03-11 Thread Miles Thompson
and grouping it? More information is needed to answer your question properly. Regards - Miles Thompson At 11:16 AM 3/11/2004 -0800, Marcjon Louwersheimer wrote: I have IIS 4.x and MySQL running on the same machine. So do queries use up bandwidth? Does it matter if I have 20 queries per page? Will that slow

Re: [PHP-DB] Sending variables to Flash from php

2004-03-03 Thread Miles Thompson
At 08:59 PM 3/3/2004 +, Donovan Hutchinson wrote: Hi, I'm working on a simple bit of flash that should display some text passed into it from PHP. I'm using the FlashVars as following (trimmed for brevity): object ... PARAM NAME=FlashVars VALUE=name=?php echo $firstname.'+'.$lastname; ?

RE: [PHP-DB] Cookies ?

2004-02-09 Thread Miles Thompson
Did you refresh the page after setting the cookie? mt At 05:00 PM 2/9/2004 -0800, Omelin Morelos wrote: I have already tried it , It's not working. Thanks -Mensaje original- De: Chris Wright [mailto:[EMAIL PROTECTED] Enviado el: Monday, February 09, 2004 5:09 PM Para: Omelin Morelos;

Re: [PHP-DB] mysql_connect problem

2004-02-02 Thread Miles Thompson
At 03:42 PM 2/2/2004 +0100, DiZEM PGC wrote: I try connecting to an existing mysql DB. The first time I directly called mysql_connect with all required params (Path/Database,User,Password) and established a connection without problems. Second time I have used a script that includes a self-written

Re: [PHP-DB] getting font size from browser

2004-01-30 Thread Miles Thompson
PHP is SERVER side, not browser side. That's a Javascript question. Miles At 11:14 AM 1/30/2004 +0100, Roy G. Vervoort wrote: Is it possible to retreive the font size or view size from the browser. In the browser it is possible to change the screenview (make it larger or smaller for people with

Re: [PHP-DB] PHP/DB speed

2003-12-21 Thread Miles Thompson
way you can pare it down? MySQL will select those records really quickly, but then the HTML has to be generated and the broser has to render the list. Try and rethink this if you can. Regards - Miles Thompson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP-DB] User defined function in a mysql query

2003-12-10 Thread Miles Thompson
1. Is the function allowed by MySQL? 2. Can you execute the function before the query, assign what it returns to a var, then place the var in your query? Miles At 04:43 PM 12/10/2003 +0100, antonio bernabei wrote: Hi, I need to make a join between two tables. And I can use the mysql_query

Re: [PHP-DB] transaction locking

2003-12-05 Thread Miles Thompson
. Regards - Miles Thompson At 06:11 AM 12/5/2003 -0700, Aleks Kalynovych wrote: Good morning all, I have a couple forms that generate a unique ID based on taking the highest number in the ID column adding 1 to its value. The problem is that I don’t save that number until the form is submitted. If 2

RE: [PHP-DB] transaction locking

2003-12-05 Thread Miles Thompson
that in the dB if you setup a new table and set a column\ To auto increment, it starts a the number 1. Can this be set to a higher number Say 5454 ?? TIA Aleks -Original Message- From: Miles Thompson [mailto:[EMAIL PROTECTED] Sent: Friday, December 05, 2003 8:24 AM To: [EMAIL PROTECTED] Subject: Re

Re: [PHP-DB] Updating multilple tables?

2003-11-27 Thread Miles Thompson
If you are searching in the same field (column) in each table, and the key field has the same name in all tables, build an array of table names and loop through it, executing your update on each iteration. Regards - Miles Thompson PS From your description it sounds as if you have a database

[PHP-DB] Re: [PHP] 'while' not picking up on first DB record

2003-09-17 Thread Miles Thompson
Please don't cross-post. See below - M. At 10:17 AM 9/17/2003 -0400, Roger Spears wrote: Hello, Can anyone from the lists please tell me why this bit of code is not picking up on the first record in the database? If the 'id' I'm looking for is '1' it doesn't populate the _SESSION variables.

Re: [PHP-DB] What happens when the database is down?

2003-07-19 Thread Miles Thompson
combination on LInux, you may be better off with 1.3.x. Aren't you also running a beta or rc version of MySQL - stable is still 3.x, isn't it? You may have two alternate sources of breakage there. Cheers - Miles Thompson At 12:00 AM 7/20/2003 +1000, Hanxue Lee wrote: Hi, I am using PHP 4.3.1

Re: [PHP-DB] Undefined Index error when trying to insert data from a form into a db

2003-06-26 Thread Miles Thompson
1. Check the manual on use of $_POST and notch down your error reporting level. As these vars have not been defined PHP is throwing an error. 2. While you are at it, and assuming that your variables are all received correctly, why not simplify your sql? insert into test_scores set field_one =

Re: [PHP-DB] Accessing MySql using Flash while using PHP as the middleware

2003-06-25 Thread Miles Thompson
Adam made a good suggestion - but using LoadVars is better, and if you are retrieving text it's easier to bring it back as an xml file, otherwise an ampersand stops you cold. Here's my call to the login script to authenticate users for a news site when the login button is clicked. The

[PHP-DB] Re: [PHP] Apache to compile PHP and Ruby languages in the same document?

2003-06-11 Thread Miles Thompson
Don't know, but it doesn't make sense to me -- Apache executes scripts based on the file extension, how can it process both languages? A possible work around would be to have the Ruby program exec()'d within PHP. Alternately, do Ruby pages, but embed PHP as PHP is presently embedded in HTML

Re: [PHP-DB] Re: [PHP] Apache to compile PHP and Ruby languages in the same document?

2003-06-11 Thread Miles Thompson
wrote: At 02:56 PM 6/11/2003 -0300, Miles Thompson wrote: Don't know, but it doesn't make sense to me -- Apache executes scripts based on the file extension, how can it process both languages? A possible work around would be to have the Ruby program exec()'d within PHP. Alternately, do Ruby pages

Re: [PHP-DB] while - if problem

2003-06-05 Thread Miles Thompson
The closing else is not bracketed. Have you echoed the vars confirmed values therein? It's amazing how often that will catch you. Otherwise simplicate: comment out a bunch of stuff and build it up bit by bit, echoing all the while. Miles Thompson At 02:07 PM 6/4/2003 -0600, Earl wrote: Sorry

Re: [PHP-DB] address info, forms, maintanance

2003-06-05 Thread Miles Thompson
? Cookies only store a bit of information on the user's browser. There's nothing magic about them - google for netscape cookies. I don't think they'd be much help to you here. HTH - Miles Thompson At 01:13 PM 6/4/2003 -0700, [EMAIL PROTECTED] wrote: I need to modify some company web pages

Re: [PHP-DB] address info, forms, maintanance

2003-06-05 Thread Miles Thompson
Chip, What's the database being used for then, if not to store and track questions and replies? If only as a repository of addresses that 's rather useless. Unless you want to track the frequency of user's questions, then you could update a counter field for their email address. If you've

RE: [PHP-DB] newsletter optimization help needed

2003-03-12 Thread Miles Thompson
I've been doing that with a much smaller list, and we periodically run into problems with subscribers SPAM filter, double-propagation of some addresses, etc. I think the days of bcc: are numbered. The approach we're working on now is to send an URL to subscribers. They click on that and view

Re: [PHP-DB] table relationship

2003-03-10 Thread Miles Thompson
when working up an access scheme. Cheers - Miles Thompson At 09:35 AM 3/10/2003 +, shaun wrote: Hi, I am creating a web site which will have different types of users: Administrators, clients and staff. Is it possible/good practice to have 3 tables related to one table i.e

Re: [PHP-DB] VFP 6 via ODBC and data integrity questions

2003-02-03 Thread Miles Thompson
and a locking problem. Alternately, if the machine you are hitting is running VFP, why not use its native sys(2015) (or 2017 - can't remember just now) to generate a random key. HTH - Miles Thompson BTW Character-based primary keys are quite common in the VFP world because FoxPro did not cleanly

Re: [PHP-DB] VFP 6 via ODBC and data integrity questions

2003-02-03 Thread Miles Thompson
about the lock and the value will be appropriately updated. Again the question is what kind of functions can you use through ODBC; I've not ever had to work with it. HTH - Miles Thompson Thanks for your help. Brian PJC Services At 03:13 PM 2/3/2003, you wrote: There's an alternate route

Re: [PHP-DB] Adding Record to database

2003-02-02 Thread Miles Thompson
Matt, Check a couple of things: 1. Do you have a primary key with unique id? You could be getting a key violation. 2. Echo $query and confirm that it is as you expect. 3. Add code to trap for, or at least display any generated error. 4. Are you able to test this INSERT at the MySQL console? If

Re: [PHP-DB] LEFT JOIN not working

2003-01-14 Thread Miles Thompson
of your diagnosis you may want to include the generated output from these functions so you see what they are returning. Fourth, if you have access to the MySQL console, try this interactively. HTH - Miles Thompson At 07:46 PM 1/14/2003 +0200, Lisi wrote: Still not working. I made the change

Re: [PHP-DB] How to return records in _random_ order ???

2002-12-16 Thread Miles Thompson
I dunno - why does this topic pop up periodically. Anyway, here are two suggestions: 1. Add a field to the table, called rand_order. Whenever you update the table insert a random number in it and when fetching records order by Rand_order. 2. Generate an array of 20 random numbers and use it

Re: [PHP-DB] how to update a text BLOB in ODBC?

2002-11-19 Thread Miles Thompson
Jeff, Check your SQL. Shouldn't $sql = insert into note_tbl (note) values ('${note}') where pkey = '45'; be UPDATE where pkey = '45' ? Or, do a delete where pkey = '45' followed by an insert. In that case check the synatx of your insert 'cause it doesn't look correct. HTH - Miles

Re: [PHP-DB] Having more than one id in the same field

2002-11-10 Thread Miles Thompson
you will be asking of your database. Regards - Miles Thompson At 12:41 PM 11/10/2002 +0200, you wrote: Hi. I have a database designing question to ask. I want to build a table of events. Among the other fields there must be a field that holds the 'responsible organization' of the event

Re: [PHP-DB] Structure Question...

2002-11-07 Thread Miles Thompson
Third choice, definitely. And aren't you glad your data is sufficiently normalized that this is a no-brainer! Cheers - Miles Thompson At 12:51 PM 11/7/2002 -0600, Doug Coning wrote: Hi everyone, I'd like to know how you would set up the following: I've set up a MySQL database with 600

Re: [PHP-DB] [PHP-MySQL] lock a record of MySQL from PHP

2002-09-27 Thread Miles Thompson
of locking, either in the MySQL docs or in a general book on SQL. Hope this helps - Miles Thompson At 12:11 PM 9/27/2002 +1000, Michael Wai wrote: I'm a newbie of PHP and MySQL. Would anyone tell me that how to lock and unlock a record of MySQL from PHP? And how other can detect whether this record

Re: [PHP-DB] CONNECT BY in mysql.

2002-09-24 Thread Miles Thompson
Go to http://www.thickbook.com and have a look at Julie Meloni's excellent tutorials. She uses MySQL and the whole process is documented and explained. There are also tutorials at www.php.net, and on WebMonkey, WeberDev, Zend ,etc. HTH - Miles Thompson At 05:23 PM 9/24/2002 +, Smita

Re: [PHP-DB] advise needed for 'authorized only' site

2002-09-23 Thread Miles Thompson
they had to save, write up an email and attach the pdf. A little more bother than simply forwarding a pdf sent to them directly. Regards - Miles Thompson At 10:22 AM 9/23/2002 -0500, Bryan McLemore wrote: you could make them log in once per session and just have every page check and see

Re: [PHP-DB] extracting unique entries from mysql dbase

2002-09-13 Thread Miles Thompson
of tutorials and examples, key words would be php, database web site. And, as always, Juli Meloni's www.thickbook.com, which has some really well-developed tutorials. Hope this points you in the right direction - Miles Thompson At 08:49 PM 9/12/2002 -0700, Godzilla wrote: Hi everyone, I have a mysql

Re: [PHP-DB] extracting unique entries from mysql dbase

2002-09-13 Thread Miles Thompson
Tim, In your query use SELECT DISTINCT, rather than SELECT. That way you will not get duplicates returned from the database. Miles At 08:49 PM 9/12/2002 -0700, Godzilla wrote: Hi everyone, I have a mysql row similar to the list below. What I need to do is have php output a link list from

Re: [PHP-DB] Need help getting record number off insert

2002-09-11 Thread Miles Thompson
. I hope you aren't planning to use this as foreign key, i.e. for referencing information in this table from another table. Miles Thompson At 08:29 AM 9/11/2002 -0400, Anthony wrote: I'm doing an insert and need to get the record number that is generated when the record in created. I'm accessing

Re: [PHP-DB] POSTGRESQL PHP

2002-09-09 Thread Miles Thompson
to be started with the -i switch to be accessible from the Internet. Check docs. Hope this helps - Miles Thompson PS For help on the list #2 suggestion is really important. At 06:10 PM 9/9/2002 +0200, Tomator wrote: I've installed MySQL and PostgreSQL on my XP. I'd like to make an PHP script working

  1   2   3   >