A second address table is definitely the way to go (the '*' signifies the
primary key):
People Table
*user_id
first_name
last_name
etc
Address Table (compound primary key)
=
*user_id (fk to People Table)
*address_id
*obs_no (you can skip this if you don't want to keep an
I'm not sure. How can I tell? This database is running on a different server
than the one that created the data. I'm trying to restore a fried server
from a backup. Not sure if that matters.
Tony
On 10/23/07 6:20 PM, "Bastien Koert" <[EMAIL PROTECTED]> wrote:
>
> Is logging turned on?
>
> bas
We've got a huge table in one of our Postgres databases and nobody seems to
know what it's for. Do any of the system tables keep track of the last time
the table was altered (i.e. Row INSERTs, UPDATEs, etc)?
Tony
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://ww
Thank you all for the responses. I think we're going to try replicating the
databases with Slony. Wish me luck!
Tony
On 10/11/07 6:23 PM, "Chris" <[EMAIL PROTECTED]> wrote:
> Tony Grimes wrote:
>> Splitting the tables probably wouldn't work. Most of the table
g everything by remote connection would be easier, but we're worried
about the performance.
Tony
On 10/11/07 6:01 PM, "Chris" <[EMAIL PROTECTED]> wrote:
> Tony Grimes wrote:
>> Have any of you tried running a PHP website using a remote database
>> connection?
>
Have any of you tried running a PHP website using a remote database
connection?
We currently have an in-house PHP website driven by a PostgreSQL database
that is HEAVILY administered within the office with an administration sister
site (also PHP).
Problem: the office connection is having trouble
> i.e.
>
> select name from users where substr(name, 1, 1) >= 'A' and substr(name,
> 1, 1) <= 'B';
>
> -B
> Dan Shirah wrote:
>> So just change it to WHERE last_name BETWEEN 'A' AND 'G' . That'll
>> get you
>&g
7 2:51 PM, "Dan Shirah" <[EMAIL PROTECTED]> wrote:
> So just change it to WHERE last_name BETWEEN 'A' AND 'G' . That'll get you
> Aa-Fz :)
>
>
> On 5/18/07, Tony Grimes <[EMAIL PROTECTED]> wrote:
>> We tried that and it didn
; but 'Fa' is not between 'A' and 'F'
> (but 'Ez' would be between 'A' and 'F')
> -B
>
>
> Tony Grimes wrote:
>> I'm using BETWEEN to return a list all people who's last names fall between
>&
I'm using BETWEEN to return a list all people who's last names fall between
A and F:
WHERE last_name BETWEEN 'A' AND 'F' ...
but it's only returning names between A and E. The same thing happens when I
use:
WHERE last_name >= 'A' AND last_name <= 'F' ...
Shouldn't this work the way I
3/13/07 5:24 PM, "Chris" <[EMAIL PROTECTED]> wrote:
> Tony Grimes wrote:
>> I have this page that lists artists alphabetically:
>>
>> http://www.wallacegalleries.com/artists.php
>>
>> At least it did until today. Nobody made any changes to the f
I have this page that lists artists alphabetically:
http://www.wallacegalleries.com/artists.php
At least it did until today. Nobody made any changes to the files, but the
database stopped sorting by artist_id. The list shown is just the default
order that mysql spits out if the SORT BY clause is
I'm developing a course calendar for a client and I'm running into
performance problems with the admin site. For example, when I try to include
registration counts in the course list, the page really slows down for large
course lists (50 or so):
COURSEATTENDEES CAPACITYSEATS LEFT
Why not build the options into your data model? Instead of using integers
for gender, use a varchar field that stores 'Male' and 'Female'. You can
ensure data integrity by adding a check constraint to the column.
If the presentation might change depending on context, you can create gender
referenc
;
>
>
> echo 'Hello World'
>
> ?>
>
> Bingo.
>
>
>
> I then take the *same* file, I don't rename it, I just open it in vi. I copy
> a single occurrence of 'pg_connect' etc...
>
>
>
> And the '
that gives a blank page, too... which is puzzling, 'cos I tried
> 'hello.php' before getting into the db 'thang', and I saw the text on the
> screen.
>
> Well .. back to the drawing board...
>
> D.
>
> Tony Grimes <[EMAIL PROTECTED]> a écr
Is your server configured to display errors? Try adding this at the top of
your script:
ini_set('display_errors',true);
It won't catch syntax errors, but it should help. Also, try adding this to
the top of your script:
echo 'test';
If you still get a blank page, then it's probably not a problem
One of my programmers did something exactly like this. I can't remember
specifics, but the car code is alpha numeric and displayed in a special
'barcode' font on the page. If you don't store any information in the code,
why not just use the PHP session id?
Tony
On 10/21/06 3:54 AM, "Mad Unix" <[
Thanks Mike. Luckily, I don¹t need the data if the table already exists so
that should work.
Tony
On 10/11/06 2:53 PM, "Mike Morris" <[EMAIL PROTECTED]> wrote:
> My advice:
>
> Do a "drop table" first, ignoring any error that will result if it does not
> exist, then do the "select into". This
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
programmatically.
Thanks
So does that mean I will always get that error? There's got to be a way
around that. Is there at least a way to detect invalid characters before I
try to insert?
Tony
On 9/26/06 1:17 PM, "Niel Archer" <[EMAIL PROTECTED]> wrote:
> PHP isn't multibyte aware by default.
>
> Niel
>
--
PHP Datab
Hi Janet,
This is a PHP 5 only function. Are you running PHP 5? If not, try using
ocilogon() instead. If you are running 5, then maybe the Oracle library
wasn't included when PHP was compiled.
HTH,
Tony
On 9/26/06 2:13 PM, "Janet Smith" <[EMAIL PROTECTED]> wrote:
> I am trying to use a program
So does that mean I will always get that error? There's got to be a way
around that. Is there at least a way to detect invalid characters before I
try to insert?
Tony
On 9/26/06 1:17 PM, "Niel Archer" <[EMAIL PROTECTED]> wrote:
> PHP isn't multibyte aware by default.
>
> Niel
>
--
PHP Datab
Hi Janet,
This is a PHP 5 only function. Are you running PHP 5? If not, try using
ocilogon() instead. If you are running 5, then maybe the Oracle library
wasn't included when PHP was compiled.
HTH,
Tony
On 9/26/06 2:13 PM, "Janet Smith" <[EMAIL PROTECTED]> wrote:
> I am trying to use a program
I'm getting the following error when PHP tries to insert a Unicode character
(the problem word is resume with the accents) into a PostgreSQL database:
pg_exec(): Query failed: ERROR: Invalid UNICODE character sequence found
(0xe97375)
I can't figure out why I'm getting the error. The HTML form i
anks,
Tony
On 4/26/06 8:55 PM, "chris smith" <[EMAIL PROTECTED]> wrote:
> On 4/27/06, Tony Grimes <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> My sys admin installed an update to H-Sphere (control panel software) that
>> broke PEAR::DB and phpBB last w
Hi,
My sys admin installed an update to H-Sphere (control panel software) that
broke PEAR::DB and phpBB last week. After much trial and error, I finally
tracked it down to missing pg_affected_rows() and pg_cmdtuples() functions
(for PEAR and phpBB respectively) in PHP. I'm assuming that the H-Sphe
27 matches
Mail list logo