[PHP-DB] Output a few tupels of 493033 tupels

2003-03-10 Thread Haiko Etzel
Hello,

I have got a little problem with my datas. In one table I have got 493033 tupels. A 
simple Output of all datas is to much for the Browsers (and the intranet-connection) 
and to ask for all and then only give out a few is also a big problem for the server.

Is there any way only to ask for some tupels in a postgres-database with PHP?

H. Etzel
__
Bequemer und billiger - SMS mit FreeMail verschicken! Mehr Information
unter: http://freemail.web.de/features/?mc=021147


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Picture Upload

2003-03-10 Thread Luke Woollard
use the GD Library functions - look up on php.net

The GD library is available from http://www.boutell.com/
It is included by default with PHP 4.3.x

NOTE: This is a question for [EMAIL PROTECTED]


-Original Message-
From: Dallas Freeman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 11 March 2003 5:07 PM
To: 
Subject: [PHP-DB] Picture Upload


Is there a possibility that you can resize an image before uploading to
the server?
 
If so, how?
 
Thanks,
 
 
Dallas Freeman


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Picture Upload

2003-03-10 Thread Dallas Freeman
Is there a possibility that you can resize an image before uploading to
the server?
 
If so, how?
 
Thanks,
 
 
Dallas Freeman


[PHP-DB] Re: adding to an array variable using a loop...?

2003-03-10 Thread Adam Royle
I assume the field 'date' in your database is a date field, and in your code
you are trying to do a date + 1, but you are not specifying *what* you are
adding to the date (ie. 1 day, 1 week, 1 month), therefore the whole
variable is being replaced (with a 1). Try looking at the various date
functions (or string functions) to work out how to do this. Depending on how
your date is setup you would use strtotime() or mktime() (or both).

Adam

--- Original Message ---
I want to create an array from results returned from a mysql query. I want
it to go through each row in the returned result, and if the variable in the
array staff exists add 1 to the total, if it doesnt exist, set it as one and
carry on.

But when i run this and do var_dump, it just returns "1" in the array for
every date.

I don't think my logic for this is correct, please help.
Cheers,
Dave.
==
$query = "SELECT * FROM Rota WHERE date >= $start and date <= ($start +
INTERVAL 6 DAY) ";
 $result = mysql_query($query);
 while ($row = mysql_fetch_array($result)){
  $x = 1;
  $date = $row['Date'];
  if ( isset($staff[$date] ) ){
   $staff[$date] = $staff[$date] + $x ;
  }
  else{
   $staff[$date] = $x ;
  }

 }


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Date in a dropbox box

2003-03-10 Thread Chris Payne
Hi there,

Thank you John, you are a lifesaver :-)

Chris

> > I have a form which displays 3 dropdowns, day, month and year, I have
> it
> > displaying the default of the dropdown for month no problem, but how
> can I
> > get it to select the current date (day) in the dropdown, but show 31
> days
> > nomatter how many days are in the month?  This is important even
> though it
> > sounds odd :-)
> > 
> > so if it was the 5th of a month, it would show 5 as a default value,
> but
> > allow you to select 1-4 before that and 6-31 after it.
> 
> Lots of ways you can do it.
> 
> $today = date('d');
> for($x=1;$x<=31;$x++)
> {
> echo ' '>$x';
> }
> 
> ---John W. Holmes...
> 
> PHP Architect - A monthly magazine for PHP Professionals. Get your copy
> today. http://www.phparch.com/
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Date in a dropbox box

2003-03-10 Thread John W. Holmes
> I have a form which displays 3 dropdowns, day, month and year, I have
it
> displaying the default of the dropdown for month no problem, but how
can I
> get it to select the current date (day) in the dropdown, but show 31
days
> nomatter how many days are in the month?  This is important even
though it
> sounds odd :-)
> 
> so if it was the 5th of a month, it would show 5 as a default value,
but
> allow you to select 1-4 before that and 6-31 after it.

Lots of ways you can do it.

$today = date('d');
for($x=1;$x<=31;$x++)
{
echo '$x';
}

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Date in a dropbox box

2003-03-10 Thread Chris Payne
Hi there everyone,

I have a form which displays 3 dropdowns, day, month and year, I have it displaying 
the default of the dropdown for month no problem, but how can I get it to select the 
current date (day) in the dropdown, but show 31 days nomatter how many days are in the 
month?  This is important even though it sounds odd :-)

so if it was the 5th of a month, it would show 5 as a default value, but allow you to 
select 1-4 before that and 6-31 after it.

Thanks everyone

Chris

RE: [PHP-DB] Database design

2003-03-10 Thread Beverly Steiner
Shaun,

I took a quick look at your database layout and noticed that Practice_ID and
Clinical_Trial_ID are repeated in the Booking table.  This isn't necessary
because the Booking table links to the Project table which contains this
information.  In the Project table, Practice_ID and Clinical_Trial_ID should
probably just be foreign keys and not primary keys to that table.  Same
thing for User_ID and Project_ID in the Booking table.

To keep track of the data you will need to create a new table which is
linked to the Clinical_Trial table.  For instance you could create a table
called Clinical_Data which has the following fields:
* Clinical_Data_ID (PK)
* Clinical_Trial_ID (FK)
* Data_Description - field that describes a piece of collected data (e.g.
blood pressure before hypnosis)

Is the User table where the client information goes?  You also need to
create a joining table between the User (or whatever table contains the
client info.) table and the Clinical_Data table.

--
Beverly Steiner
[EMAIL PROTECTED]


-Original Message-
From: shaun [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 8:53 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Database design


Hi,

I am creating a database for a web application. The idea for the application
is for a company administrator to be able to log into the site and allocate
staff to a project which will be a clinical trial at a particular practice.
Staff will be able to log in and update the status of the project they are
working on and clients will be able to log in and book a member of staff.
Administrators will be able to add / edit / delete - staff / clients /
clinical trials.

Here is my database diagram:

http://www.mania.plus.com

My problem is each different clinical trail will need to have different data
collected for it. How could I handle this in the database model? The
administrator would like to be able to edit the data collected for each
trial via the site...

Any other comments on my database model would be appreciated as this is my
weakest area of web development by far!




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] adding to an array variable using a loop...?

2003-03-10 Thread David Rice
I want to create an array from results returned from a mysql query. I want 
it to go through each row in the returned result, and if the variable in the 
array staff exists add 1 to the total, if it doesnt exist, set it as one and 
carry on.

But when i run this and do var_dump, it just returns "1" in the array for 
every date.

I don't think my logic for this is correct, please help.
Cheers,
Dave.
==
$query = "SELECT * FROM Rota WHERE date >= $start and date <= ($start + 
INTERVAL 6 DAY) ";
	$result = mysql_query($query);
	while ($row = mysql_fetch_array($result)){
		$x = 1;
		$date = $row['Date'];
		if ( isset($staff[$date] ) ){
			$staff[$date] = $staff[$date] + $x ;
		}
		else{
			$staff[$date] = $x ;
		}

	}

_
It's fast, it's easy and it's free. Get MSN Messenger today! 
http://messenger.msn.co.uk

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Query Help...

2003-03-10 Thread NIPP, SCOTT V (SBCSI)
Thanks for all the advice, I thought it might have something to do
with being a reserved word.  I changed the table name from group to grps,
and everything works fine now.

-Original Message-
From: Rob Bryant [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 11:39 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Query Help...


- Original Message -
From: "NIPP, SCOTT V (SBCSI)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 10, 2003 9:23 AM
Subject: [PHP-DB] Query Help...


> I am having a lot of trouble with a query that works fine from a
> basic SQL command line, but fails in my web script.  Here is the
portion of
> code including the query:
>
> mysql_select_db($database, $Prod);
> $query_groups = "SELECT name FROM group";
> $groups = mysql_query($query_groups, $Prod) or die(mysql_error());
>
> Here is the error I am receiving:
>
> You have an error in your SQL syntax near '"group"' at line 1
>

Have you tried using backticks in your query? E.g.,

$query_groups = "SELECT name FROM `group`";

--
rob


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Query Help...

2003-03-10 Thread Rob Bryant
- Original Message -
From: "NIPP, SCOTT V (SBCSI)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 10, 2003 9:23 AM
Subject: [PHP-DB] Query Help...


> I am having a lot of trouble with a query that works fine from a
> basic SQL command line, but fails in my web script.  Here is the
portion of
> code including the query:
>
> mysql_select_db($database, $Prod);
> $query_groups = "SELECT name FROM group";
> $groups = mysql_query($query_groups, $Prod) or die(mysql_error());
>
> Here is the error I am receiving:
>
> You have an error in your SQL syntax near '"group"' at line 1
>

Have you tried using backticks in your query? E.g.,

$query_groups = "SELECT name FROM `group`";

--
rob


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Query Help...

2003-03-10 Thread George Pitcher
Scott,

'Group' is a reserved word so you can't use it for a column name. try
changing it to 'groups' or soething else that makes sense but is safe.

George

> -Original Message-
> From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]
> Sent: 10 March 2003 5:24 pm
> To: '[EMAIL PROTECTED]'
> Subject: [PHP-DB] Query Help...
>
>
>   I am having a lot of trouble with a query that works fine from a
> basic SQL command line, but fails in my web script.  Here is the
> portion of
> code including the query:
>
> mysql_select_db($database, $Prod);
> $query_groups = "SELECT name FROM group";
> $groups = mysql_query($query_groups, $Prod) or die(mysql_error());
>
>   Here is the error I am receiving:
>
>   You have an error in your SQL syntax near '"group"' at line 1
>
>   I am wondering if for some reason group is trying to be
> interperetted as the "GROUP BY" MySQL function?  I am running PHP 4.2.3
> against a MySQL DB on an Apache 1.3.27 server.  Thanks in advance for the
> help.
>
> Scott Nipp
> Phone:  (214) 858-1289
> E-mail:  [EMAIL PROTECTED]
> Web:  http:\\ldsa.sbcld.sbc.com
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Query Help...

2003-03-10 Thread NIPP, SCOTT V (SBCSI)
I am having a lot of trouble with a query that works fine from a
basic SQL command line, but fails in my web script.  Here is the portion of
code including the query:

mysql_select_db($database, $Prod);
$query_groups = "SELECT name FROM group";
$groups = mysql_query($query_groups, $Prod) or die(mysql_error());

Here is the error I am receiving:

You have an error in your SQL syntax near '"group"' at line 1

I am wondering if for some reason group is trying to be
interperetted as the "GROUP BY" MySQL function?  I am running PHP 4.2.3
against a MySQL DB on an Apache 1.3.27 server.  Thanks in advance for the
help.

Scott Nipp
Phone:  (214) 858-1289
E-mail:  [EMAIL PROTECTED]
Web:  http:\\ldsa.sbcld.sbc.com



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Prepare Sql statement

2003-03-10 Thread Alejandro Michelin Salomon \( Adinet \)
Hi:

I am working with php 4.1.1, in a linux i386.

How i prepare a sql statement with  odbc_prepare ?

How create parameters for a sql, to use in odbc_execute ?

Alejandro Michelin Salomon

PROBrax e-Tech, Brasil


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Database design

2003-03-10 Thread shaun
Hi,

I am creating a database for a web application. The idea for the application
is for a company administrator to be able to log into the site and allocate
staff to a project which will be a clinical trial at a particular practice.
Staff will be able to log in and update the status of the project they are
working on and clients will be able to log in and book a member of staff.
Administrators will be able to add / edit / delete - staff / clients /
clinical trials.

Here is my database diagram:

http://www.mania.plus.com

My problem is each different clinical trail will need to have different data
collected for it. How could I handle this in the database model? The
administrator would like to be able to edit the data collected for each
trial via the site...

Any other comments on my database model would be appreciated as this is my
weakest area of web development by far!




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re:PHP + Interbase / Firebird extensions

2003-03-10 Thread Philippe Makowski
Any idea where I can download the interbase module??


Here :

--
Philippe Makowski
Firebird serveur SQL open-source en français http://firebird-fr.eu.org

Ma clé PGP : http://makowski.eu.org/pgpkey.html



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] table relationship

2003-03-10 Thread Miles Thompson
Three tables seems wasteful, and could mean that you have to do three 
queries when looking for someone. Why not approach it this way.

Users table - info on all users, regardless of category

Levels table - sets different access levels, e.g. clients, staff, 
administrators

User_levels table - assigns levels to user id's

This would give you more long-term flexibility as you would only have to 
extend the levels table to add granularity of access or control levels.

I'd also have a look at various network permission schemes, because there 
are subtleties that are not immediately apparent 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.
 USER
 user_id (PK)
  |
  |
  |   ||
  |   ||
AdministratorClient  Staff
admin_id(PK)   client_id(PK)   staff_id(PK)
user_id(FK)  user_id(FK)user_id(FK)
Thanks in advance for any advice offered.



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Help with file upload

2003-03-10 Thread Ahmed Shams


I am trying to upload a file but the problem i am having is that i get no 
value if i used $HTTP_POST_FILES['userfile']['name']  i have my register 
globals on and everything but i just can't see what am i doing wrong. here 
is my code:
/*
-$dir = ".\Apache\htdoc\ ";
-$dir .= $_POST['img1'];
-$temp1 = $_POST['img1'];

-$filename = $HTTP_POST_FILES['img1']['name'];
-echo "filename is $filename\n";
-$temp_file = $HTTP_POST_FILES["img1"]["tmp_name"];
-$file_type = $HTTP_POST_FILES["img1"]["type"];
-if($HTTP_POST_VARS['img1']['name'] != ""){
copy($temp1,$dir) or
die ("Couldn't copy the file");
-}else{
die("No input file specified");
-}
-?>

-
-
-Successful upload 
-
-You sent: , a 
- byte file of type . 
-
-
*/
please help me because i need this ASAP.. thank you all

_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Passing value in URL to Form

2003-03-10 Thread Hutchins, Richard
If I understand your question correctly, you are interested in finding a way
to pull values from the URL and insert them into a form using just HTML, no
PHP.

Going on that assumption, I'm pretty sure the answer is no. I think the only
way you can pull that off is with SOME kind of scripting language. PHP is
one option, but you may be able to use JavaScript to do it as well.

As a matter of fact, a quick search on Google for "Javascript GET values"
yielded many matches, of which, this one may be of particular interest to
you:

http://javascript.internet.com/forms/passing-values-source.html

You might also want to consider posting your question to a JS or general
HTML mailing list. You may get better/more responses since this list is
primarily concerned with the use of PHP with a database and your question
appears to be mostly HTML-based.

Good luck.

> -Original Message-
> From: Stephen K Knight [mailto:[EMAIL PROTECTED]
> Sent: Sunday, March 09, 2003 10:06 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Passing value in URL to Form
> 
> 
> I have managed to pass information through a URL and extract 
> it and insert
> it into a form on a php document.  Can this be done for an 
> html document?
> Passing the value through the URL to an html page with form 
> and then through
> a URL again into a php doc.  I tried the same method I used 
> in the php doc
> in the html doc but it didn't work.
> 
> Any ideas?
> 
> In kindness,
> Stephen
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Fwd: Re: [PHP-DB] need help with foreach()

2003-03-10 Thread Jason Wong
On Monday 10 March 2003 17:56, David Rice wrote:
> Here is the complete function I am using.
> I returned, for testing i commented out the foreach loop and returned
> $staff, then $tips both arrays returned NULL when i did a
> var_dump(pointvalue($startdate));

I haven't been following this thread so I'm not sure what your objective is. 
But ...


> function pointvalue($start){
>   $query = "SELECT * FROM Tips WHERE date >= $start and date <= ($start +
> INTERVAL 6 DAY) ";
>   $result = mysql_query($query);
>   while($row = mysql_fetch_array($result)){
>   $date = $row[Date];

You should really be using:

   $date = $row['Date'];

Also what is $date supposed to be storing? Each iteration of the while-loop 
it's being overwritten with the 'latest' date.

>   $tips[$date] = $row[TotalTips];

As above you should put single-quotes around your array subscripts.

>   }
>   $query = "SELECT * FROM Rota WHERE date >= $start and date <= ($start +
> INTERVAL 6 DAY) ";
>   $result = mysql_query($query);
>   while ($row = mysql_fetch_array($result)){
>   $date = $row[Date];

Again, see above comments.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
--
/*
You can observe a lot just by watching.  -- Yogi Berra
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] table relationship

2003-03-10 Thread Ignatius Reilly
Yes. You have to use the "subtype" relational design:

 USER
 user_id (PK)
  |
  |
  |   ||
  |   ||
AdministratorClient  Staff
user_id(PFK)   user_id(PFK)   user_id(PFK)
admin_field1 user_field1   staff_field1
admin_field2
.
With a 1-1 relationship from Administrator to User, 0-1 relationship from
User to Administrator
(PFK : PRIMARY KEY and FOREIGN KEY)
This is particularly useful when the subtypes have different fields, so you
don't want to have only one table with many blanks for fields that do not
relate to the type at hand.

HTH
Ignatius

- Original Message -
From: "shaun" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 10, 2003 10:35 AM
Subject: [PHP-DB] table relationship


> 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.
>
>
>  USER
>  user_id (PK)
>   |
>   |
>   |   ||
>   |   ||
> AdministratorClient  Staff
> admin_id(PK)   client_id(PK)   staff_id(PK)
> user_id(FK)  user_id(FK)user_id(FK)
>
>
> Thanks in advance for any advice offered.
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Fwd: Re: [PHP-DB] need help with foreach()

2003-03-10 Thread David Rice
Here is the complete function I am using.
I returned, for testing i commented out the foreach loop and returned 
$staff, then $tips both arrays returned NULL when i did a 
var_dump(pointvalue($startdate));

can anyone see how this could be solved?

Cheers,
dave
==
function pointvalue($start){
	$query = "SELECT * FROM Tips WHERE date >= $start and date <= ($start + 
INTERVAL 6 DAY) ";
	$result = mysql_query($query);
	while($row = mysql_fetch_array($result)){
	$date = $row[Date];
		$tips[$date] = $row[TotalTips];
	}
	$query = "SELECT * FROM Rota WHERE date >= $start and date <= ($start + 
INTERVAL 6 DAY) ";
	$result = mysql_query($query);
	while ($row = mysql_fetch_array($result)){
		$date = $row[Date];
		if (isset($staff[$date])){

			$staff[$date] = $staff[$date] + 1;

}
else{
$staff[$date] = 1;
}
}
return $staff;
}
_
Use MSN Messenger to send music and pics to your friends 
http://messenger.msn.co.uk

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] content management

2003-03-10 Thread shaun
I would really appreciate some advice from anyone who has worked with or
developed their own content management system.

This is my scenario, when i have finished creating a site, i want to be able
to add in the CMS with a minimum amount of fuss. I want to be able to get
the CMS to recognize all the tables and somehow allow me to set the tables
and fields that the client can update safely (i.e. if it is an employment
recruitment site then they will be able to add jobs but not job_id). This
will save me so much time rather than having to handcode the CMS for every
site.

I think i have an answer to my problem, and would be interested to hear your
opinion. When i install the CMS it will read the existing tables and create
2 new tables:

CMS_TABLES
cms_table_id(PK)
cms_table_name
cms_table_is_editable

CMS_FIELDS
cms_field_id(PK)
cms_table_id(FK)
cms_field_name
cms_field_is_editable
cms_field_type
cms_field_size
cms_field_is_primary_key

As an administrator I will be able to set fields and tables which are
editable. Now when i go to the database management page i can do 'SELECT *
FROM CMS_FIELDS WHERE cms_table_id = '$_GET[table_id]' AND
cms_field_editable = TRUE

Also does anyone have any suggestions for editing static content?

Any comments here would be greatly appreciated.

Thanks





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] table relationship

2003-03-10 Thread shaun
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.


 USER
 user_id (PK)
  |
  |
  |   ||
  |   ||
AdministratorClient  Staff
admin_id(PK)   client_id(PK)   staff_id(PK)
user_id(FK)  user_id(FK)user_id(FK)


Thanks in advance for any advice offered.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: Cannot connect PostgreSQL 7.3.1. Using PHP thru...

2003-03-10 Thread H. Etzel
-BEGIN PGP SIGNED MESSAGE-

I think  the problem is the username. you have a user "administrator"? At 
postresql the administratzor is the user postgres.

Perhaps you try first with 'reateuser' to create a new user, peraps with all 
rights, and then you can try to connect with  this username an password.

Hope this can help

H.Etzel



Patrick Lok wrote:

> tcpip_socket is enabled!
> access to postgresql is granted; ip-address is added to pg_hba.conf -
> METHOD = trust
> 
> ./pl
> 
> 
> 
> "Patrick Lok" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> I have the following setups:
>> *PostgreSql 7.3.1 and MSSQL on Win2k server (A)
>> *Apache 1.3.x + PHP 4.3.1.1(using CGI & loaded w/ php_pgsql.dll) +  ODBC
> for
>> PostgreSql v7.02.00.05 on Win2K server (B)
>>
>> I tried to use phppgadmin 2.4.2  and odbc for postgresql to connect
>> PostgreSql in (A) but both connection failed!
>>
>> Can somebody give me some advices?
>> Can PHP access remote DB server?
>> Can ODBC for PostgreSql access remote DB server?
>>
>> Best regards
>> ./pl
>>
>>
>>
>> Using  PHPPGADMIN 2.4.2 to administer but it says "Wrong
> username/password.
>> Access denied".
>>
>> The following is logged on psqlodbc_.log:
>> DSN info:
>>
> 
DSN='PostgreSQL',server='192.168.1.16',port='5432',dbase='tet',user='adminis
>> trator',passwd=''
>>
>> onlyread='0',protocol='6.4',showoid='0',fakeoidindex='0',showsystable='0'
>>   conn_settings='',conn_encoding='OTHER'
>>   translation_dll='',translation_option=''
>>
>>
>> I wrote a simple php program in (B) to connect to server (A) using odbc
> for
>> postgresql but the connection failed!
>>
>> > $rtn = odbc_connect("PostgreSql","administrator","");
>> $cur=odbc_exec($rtn,"select d_base, high_jrnal from salfmsc");
>> while(odbc_fetch_row($cur)){
>> $fld1=odbc_result($cur,1);
>> $fld2=odbc_result($cur,2);
>> echo $fld1;
>> echo ("-");
>> echo $fld2;
>> echo ("");
>> }
>> echo odbc_close($rtn);
>> ?>
>>
>> BUT Warning is returned.
>> Warning: SQL error: Could not connect to the server; Could not connect to
>> remote socket., SQL state 08001 in SQLConnect in
>> d:\tmp\webcodetest\mstest.php on line 3
>>
>> The following is logged on psqlodbc_.log:
>> DSN info:
>>
> 
DSN='PostgreSql',server='192.168.1.16',port='5432',dbase='tet',user='adminis
>> trator',passwd=''
>>
>> onlyread='0',protocol='6.4',showoid='0',fakeoidindex='0',showsystable='0'
>>   conn_settings='',conn_encoding='OTHER'
>>   translation_dll='',translation_option=''
>> conn = 15742608, PGAPI_Connect(DSN='PostgreSql', UID='teter', PWD='')
>> Global Options: Version='07.02.0005', fetch=100, socket=4096,
>> unknown_sizes=0, max_varchar_size=254, max_longvarchar_size=8190
>> disable_optimizer=1, ksqo=1, unique_index=1,
>> use_declarefetch=0
>> text_as_longvarchar=1, unknowns_as_longvarchar=0,
>> bools_as_char=1 NAMEDATALEN=64
>> extra_systable_prefixes='dd_;', conn_settings=''
>> conn_encoding='OTHER'
>> CONN ERROR: func=PGAPI_Connect, desc='Error on CC_connect', errnum=101,
>> errmsg='Could not connect to the server'
>> 
>> henv=15742552, conn=15742608, status=0, num_stmts=16
>> sock=15753592, stmts=15761872, lobj_type=-999
>>  Socket Info ---
>> socket=-1, reverse=0, errornumber=4, errormsg='Could not
> connect
>> to remote socket.'
>> buffer_in=15753664, buffer_out=15757768
>> buffer_filled_in=0, buffer_filled_out=0, buffer_read_in=0
>>
>>

- -- 


- -BEGIN PGP PUBLIC KEY BLOCK-
Version: 2.6.3in

mQENAz5p1tsAAAEIAOO1/GiPZI6Tp8n2Cu34Jm+ofXw6gWpXnHcu73WHEIhaUAgV
S+jnpsIWDmBCASIBxFymDKehIcGMrShS2RR0x3lrYBIKtv6/8nzMGLXWSu689FA8
52v5WYge8WCBS0KGEx7CC5jNplPgFOTWL/K7jy+KCIjUrZ5tuKLlrIpah5UIhz/K
ciD6wa9kAvzMIp/nTT+WXLk+F8Le5sShw0maSXVaizQd2xKHe/ZVgGJ7swKqsgEG
Nka2YaBDzYvorr0viu/vYV0ZSAyCsJ7F/0G1r0JO4lQRz8lWoR3HvJ8Smye5SFdH
7JRTzg6zodMTBRfeH6+vSb/bobvDmYZ/Z9KsEmMABRG0HkguIEV0emVsIDxoZXR6
ZWwuZGV2ZWxAd2ViLmRlPokBFQMFED5p1xGZhn9n0qwSYwEBtckH/jBYOFUTRCoz
ht4ZVddpA0Tud0RKZdE/is1gRQpP2y/ksKTxtFteJpoQMWAPVIK2WQ+VaZTF61XN
5hBrkSCow9vVNMsu7uqXXiuH2Ks1LVb5Zv1dLORJB/CuliDaYgoFTf5JvzaHBgqV
r/Qq+qtGoagWaNCL79/sNofDEe8aIRkrSn1L8wD90PnULZ3X9ot/RBsBK+VGk+zT
Akd5rzrucw1FNYzfWXOK6QGTdzMqjQCJqRHW9oxKOzzxFNMnsVHOH3xWuo29ch1z
hOPhXE2unxNXyZrcskfSV0qhd4unOwOyzZkNpf/cYs5OQB9G3G8Czuai0fCdEuwt
pzj4uAhKvNo=
=5Z9r
- -END PGP PUBLIC KEY BLOCK-

-BEGIN PGP SIGNATURE-
Version: 2.6.3in
Charset: noconv

iQEVAwUBPms6F5mGf2fSrBJjAQE5iwf+O2eCOJUxXHV2ZIleeSG5BDNVq7YJWWcP
pVQJDFK3Cj87Kfe4H3S7PMXHWtexxnQElHmsJLma/w3ouWcjHNTZ2Wjwz6kMeWZT
M4Nw/BqPLZuXZhHTMR07IlHj7PGosQmKnQnxCf5h6nTZX0c6H2rLxmqgOKMNG6KB
SFWR+k5qwLau1OyaPW42aKtK0Eiel92Me0C+JrifahIKH7Wg3NUur5UKAdMHvBKh
louRzBkpWWySqwtHACvGgxhWH2E1YgchztQtoSh8IYZW7KTl0Y0r1m1WaesYpQT5
p20zO5eainNw2RyW8THmZOsRWdZ9/XcBPUoExw1R5f+b15

Re: [PHP-DB] PHP + Interbase / Firebird extensions

2003-03-10 Thread Koleszár Tibor
Dear Andrew

You can download the source from:
http://packages.debian.org/unstable/web/php4-interbase.html


Cheers

Tibor

- Original Message -
From: "Andrew Neillans" <[EMAIL PROTECTED]>
To: "'Koleszár Tibor'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, March 08, 2003 4:41 PM
Subject: RE: [PHP-DB] PHP + Interbase / Firebird extensions


> Tibor,
>
> Thanks for your response!
>
> I thought it would be fairly simple to find the RPM for Mandrake / Redhat
> and install it, but I can't seem to find one anywhere for php4-interbase.
>
> Apache and PHP are compiled for module support, as I have a couple of
> modules already installed and running.
>
> Any idea where I can download the interbase module??
>
> Andy
>
> > Dear Andy,
> >
> > Sorry if i cant answer for your question, I'm a Debian user and I don't
> > know
> > the apache and php packages of Readhat and Mandrake. In Debian simply
> > you have to apt-get the php4-interbase module for php and you have to
> > restart apache.
> > You should check your system about:
> >  - is apache configured and compiled for modules?
> >  - is php compiled for modules?
> >  - if so, compile or download interbase module for you version of php
and
> > restart apache.
> >
> > This should work.
> >
> > Tibor
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php