Re: [PHP-DB] Really weird problem: cross-server databasing *g*

2001-09-02 Thread Doug Semig
Hi Markus-- It sounds like the provider that only allows local connections to their database went through some pains to protect their database. I suggest talking to them about your needs and not trying to circumvent their security measures. Maybe they have a system to open up their database

Re: [PHP-DB] Searching sql database using php

2001-09-02 Thread Doug Semig
Yes. If you have a specific question, please post it and I'm sure folks will be willing to try to help you out. Doug At 12:50 PM 9/3/01 +1000, Devon wrote: As per topic anyone know how to do it? Cheers --Doug's Signature File ~ ~ ~ I'm proud to work

RE: [PHP-DB] Simple database error (SPACE)

2001-08-30 Thread Doug Semig
DW was correct, Nagasea. The way to do what you want to do is to use the urlencode (and perhaps the urldecode) PHP command(s). They are in the PHP manual. I don't understand what it was that DB told you to do, so I cannot comment on that, but the correct solution to your problem lies with

Re: [PHP-DB] Database Transactions and HTTP statelessness

2001-08-29 Thread Doug Semig
Hi BP-- 0. User A loads Record R. 1. User B loads Record R. 2. User B edits and saves Record R. (Saving involves starting a transaction, retrieving R from the DB, comparing the values with the original values to make sure it is the same record, and then the UPDATE and then

Re: [PHP-DB] Database Transactions and HTTP statelessness

2001-08-29 Thread Doug Semig
wrote: On Wed, 29 Aug 2001 03:18:01 -0400, [EMAIL PROTECTED] (Doug Semig) [--snip--] thanks. that was one of the alternatives i'd been considering. heh, i was trying to avoid the complexity. after all, if the database already has locking and data consistency built-in, why reinvent the wheel

Re: [PHP-DB] SELECT giving too much :)

2001-08-29 Thread Doug Semig
Hi Beau-- This is just a wild guess (I've only glanced at your SQL), but do you have two locations in your locations table? You might want to try yanking locations out of the join since you're not using it in your WHERE clause or showing any info from it. Doug At 12:06 PM 8/30/01 +0800, Beau

RE: [PHP-DB] SELECT giving too much :)

2001-08-29 Thread Doug Semig
Hi Beau-- Alternatively you could probably include an AND for the location ID to link up with whatever it is supposed to link up to in the WHERE clause. But I have no idea how you responded to my message in 2 minutes flat! Are you a remarkably complex AI autoresponder that knocks the socks off

Re: [PHP-DB] MySQL DB CleanUp Help!

2001-08-23 Thread Doug Semig
Or of course one could compile PHP as a standalone and simply cron the script itself. No matter how PHP is invoked, though, IMHO scripts like this that require no human interaction should be a bit more robust than interactive systems. For example, one would probably want to code it to make sure

RE: [PHP-DB] 2 Tables- 1 Insert Problem

2001-07-29 Thread Doug Semig
Beyond that excellent answer, this is exactly the kind of situation where transactions would be helpful (and in a lot of cases, mission critical). So an expanded quasi-pseudocode rendition of olinux's answer could be: $result_bt = mysql_query('[whatever it takes to begin a transaction]');

Re: [PHP-DB] Re: enum !!

2001-07-16 Thread Doug Semig
I applaud your efforts to learn SQL. I wonder, though, if the PHP-DB list the best place to learn SQL. I would think that a book or a web-based tutorial on SQL would be more conducive to your efforts. In the example you have given below, you would probably want to use LIKE. For example,

Re: [PHP-DB] sql problem

2001-06-26 Thread Doug Semig
A quick glance suggests to me that it is a nonstandard proprietary extension to SQL that provides a way to set a kind of a variable and use it in a subsequent nonstandard proprietary SQL-looking statement that is awfully procedural. You'll probably want to either consult the documentation for

Re: [PHP-DB] Treelike data: adjacency list or nested sets?

2001-04-20 Thread Doug Semig
I almost always use "adjacency lists" along with another table for the actual categorization of the info (in your case, published articles). I find the "nested sets" design limiting unless you have complete foreknowledge of your tree/categories when initially populating the table. If you have to

Re: [PHP-DB] Concurrent update to database (PostgreSQL or MySQL) ??

2001-04-18 Thread Doug Semig
As others have mentioned, this is a tricky thing to do. What others haven't mentioned is a way to do it. Let's say you just showed the update form to two users. It contains the fields that they are allowed to update and the values in those fields had been retreived from the database. Both

Re: [PHP-DB] php with mysql or interebase?

2001-04-17 Thread Doug Semig
[In a deadpan voice...] Oh, what a fascinating twist. http://marc.theaimsgroup.com/?l=php-db is where this particular list is archived. That's where you can learn a lot about the individual programs, and you may find out little bits of wisdom like: each database has strengths and weaknesses,

Re: [PHP-DB] SELECT query

2001-04-13 Thread Doug Semig
Have you thought about normalizing your data model? It could make your task a lot easier. Doug At 11:33 PM 4/13/01 +0530, Sharmad Naik wrote: I have three table called table1, table2, table3 all having fields like: table1 contain id and username and id referencing table4 table2 contains id and

Re: [PHP-DB] Postgres auto increment.

2001-04-13 Thread Doug Semig
Just off the top of my head...so please forgive any typos or blatant mistakes... CREATE SEQUENCE sequencename; CREATE TABLE mytable ( id int DEFAULT NEXTVAL('sequencename'), whatever varchar(32), PRIMARY KEY(id) ); Doug At 11:28 PM 4/13/01 -0600, John Starkey wrote: I've been using mysql

Re: [PHP-DB] Best way to check if a query succeeded

2001-03-29 Thread Doug Semig
I see you there's been lots of responses already, but there's an important related bit of news folks might want to know. Everyone who uses the mysql_affected_rows() should know that a bug was fixed in 3.23.36 that evidentally reports affected rows incorrectly if MySQL was compiled without

Re: [PHP-DB] help with a parse error

2001-03-28 Thread Doug Semig
You didn't mention if the parse error was coming from PHP or from MySQL. The PHP syntax looks okay to me at first glance (that is, a quick look through indicates that there appears to be appropriate numbers of semicolons and closing braces). So perhaps the thing issuing the parse error is MySQL?

Re: [PHP-DB] help with a parse error

2001-03-28 Thread Doug Semig
Gee...all I looked at were the semicolons and the braces (those are what I mess up on the most). I guess it's a good thing I mentioned the space in the endif! It turns out that if you use that syntax, you cannot have a space there. Doug At 01:19 PM 3/29/01 +0930, Timothy Aslat wrote: Petra

Re: [PHP-DB] simple sql question

2001-03-27 Thread Doug Semig
There is no date that was before Jan 4th and on or after March 1st simultaneously--not even March 27th. Today might be a special day to individuals for varying reasons (birthdays, anniversaries, new jobs, promotions, whatever) but it's not THAT special that it simultaneously exists in two

Re: [PHP-DB] upperCase

2001-03-11 Thread Doug Semig
Your personal dancing monkey says: strtoupper()http://www.php.net/manual/en/function.strtoupper.php RTFM. Doug At 06:01 PM 3/11/01 +0800, Hoo Kok Mun wrote: Hi, I am using mysql-3.22.32 with php4. I have a little problem with the uppercase. I wanted to display a user input field in

Re: [PHP-DB] case insensitive search

2001-02-10 Thread Doug Semig
You could use the UPPER function. Fortunately you're using PostgreSQL, which conforms with much of the ANSI standard. UPPER and LOWER are implementations of the fold functions required by ANSI SQL. This would be the most standard way to solve your problem (with the notable exception of support