Hi Alexander--
I see folks have already answered your question. However, I would like to
mention why what you're doing is not-so-great.
How would you search your current db for a person? You have to Union all
the tables together to do what would otherwise be a simple search, or fire
off four S
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
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 for
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 urlen
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
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 L
Hope this helps,
Doug
At 12:13 PM 8/29/01 GMT, Bopolissimus Platypus 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, i
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 commit
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 t
Hi Barry--
First, I want to see if I understand what you mean, then I'll take a shot
at some SQL to solve the problem.
I take it you have two tables, "a" and "b". They may look something like
this:
Table: a
id name
--- --
001 Bob
002 Ted
003 Mary
004 S
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]');
$resul
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, "SELE
Hi KM--
The general format for the INSERT goes something like this:
INSERT INTO anytable (columnname) VALUES (NULL);
You technically do not need the newlines ("\n") in your $stmt.
So I guess I'm saying that in the code if you change the $asinteger
assignment to:
$asinteger = "NULL"; /* notice
You may want to use stripslashes($name) in there instead of just $name.
Doug
At 09:18 PM 6/30/01 -0700, Ken Sommers wrote:
>HI,
>IF i add my name as Carol O'Conner in a form and Echo (PHP 4.06 on win 95)
it back I see
>
>Carol O\'Conner
>
... snip ...
>
>I am already using:
>
>
>
>Thanks fo
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 the
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
Aha! A professional!
There are pros and cons to the timestamp/checksum method, as I'm sure you
know. So let's go over a few of them just so on the off chance that in the
future someone with a similar question might actually look in the list
archives. (I calculate that the chances of someone lo
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 user
[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,
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
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 a
nl2br() is useful in such cases.
http://www.php.net/manual/en/html/function.nl2br.html
Doug
At 11:32 AM 4/9/01 +0800, sam wrote:
>Hello,
>
>I have this field filled up from within a text area. Something the same as
>that on message boards but something that has more characters in it. I have
>it
Hi Bob!
That would make a very interesting study. Attempting to come up with a
modern definition of RDBMS. Of course, it would be only an academic
exercise...but it would be a fascinating paper if any youngsters reading
this from a university dorm room or computer lab would like to tackle it.
Transactions are not for critical data such as credit card numbers. There
are at least a couple of reasons for transactions and neither of the
reasons I can think of are for storing critical data such as credit card
numbers.
Transactions are for updates to the database that must happen all toget
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 support
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 wr
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?
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 mutua
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
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
No matter what language or environment you're programming in, you will want
to refer to the documentation and recommendations supplied by the
publishers of your RDBMS as to the best way to avoid key collisions.
A few of the methods I've seen most frequently appear to be:
1. Use a proprietary
31 matches
Mail list logo