RE: [PHP-DB] PHP & Database Problems

2012-05-02 Thread Gavin Chalkley
Ethan,

Some coding you are using would be helpful (as far as i am aware attachments
are not support on the mailing list's)

Gav

-Original Message-
From: Ethan Rosenberg [mailto:eth...@earthlink.net] 
Sent: 02 May 2012 19:54
To: php-db-lists.php.net; php-gene...@lists.php.net
Subject: [PHP-DB] PHP & Database Problems

  have a database

mysql> describe Intake3;
++-+--+-+-+---+
| Field  | Type| Null | Key | Default | Extra |
++-+--+-+-+---+
| Site   | varchar(6)  | NO   | PRI | |   |
| MedRec | int(6)  | NO   | PRI | NULL|   |
| Fname  | varchar(15) | YES  | | NULL|   |
| Lname  | varchar(30) | YES  | | NULL|   |
| Phone  | varchar(30) | YES  | | NULL|   |
| Height | int(4)  | YES  | | NULL|   |
| Sex| char(7) | YES  | | NULL|   |
| Hx | text| YES  | | NULL|   |
++-+--+-+-+---+
8 rows in set (0.00 sec)

mysql> describe Visit3;
++--+--+-+-++
| Field  | Type | Null | Key | Default | Extra  |
++--+--+-+-++
| Indx   | int(4)   | NO   | PRI | NULL| auto_increment |
| Site   | varchar(6)   | YES  | | NULL||
| MedRec | int(6)   | YES  | | NULL||
| Notes  | text | YES  | | NULL||
| Weight | int(4)   | YES  | | NULL||
| BMI| decimal(3,1) | YES  | | NULL||
| Date   | date | YES  | | NULL||
++--+--+-+-++

and a program to enter and extract data.

I can easily extract data from the database. However, if I try to enter
data, it goes into the incorrect record.  Following are some screenshots.
The program is attached.  [pardon the comical names.  This is a test, and
any resemblance to true names is not intentional]

Let us say that I wish to deal with Medical Record 1:


This it data from Intake3:
Site Medical Record First Name Last Name Phone Height Sex History AA 1
David Dummy 845 365-1456 66 Male c/o obesity. Various treatments w/o success

This is data from Visit3:
Index Site Medical Record Notes Weight BMI Date
2322 AA 1 Second Visit. 170 27.4 2010-01-20
2326 AA 1 Third visit. Small progress, but pt is very happy. 165
26.6 2010-02-01


I then request to enter additional data:

Site Medical Record First Name Last Name Phone Height Sex History
AA 10003 Stupid Fool 325 563-4178 65 Male Has been convinced by his 
friends that he is obese. Normal BMI = 23.
Index Site Medical Record Notes Weight BMI Date

Notice that it is entered into record 10003

The data is "First Try"

Index Site Medical Record Notes Weight BMI Date
2590 AA 10003 First Try 189 31.4 02 May 2012

Help and advice, please.

Thanks.

Ethan



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



Re: [PHP-DB] php database

2008-04-18 Thread Jason Pruim


On Apr 18, 2008, at 7:35 AM, nickthegreek- wrote:


hello to everyone.. what i wanna..

is to send me the total code from the connection in the database  
until the

end

what i wanna is

i have a connection in database

and i wanna my page to show a dropdown menu whick shows the column  
name in

my database "select name from xxx"

when i select a name from the dropdown menu , iw anna to show me  
what name i

have selected..
pls help


Are you looking for something that just displays the table names in a  
drop down box? Do you have any code you could show to help explain  
your question?




--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
[EMAIL PROTECTED]




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



Re: [PHP-DB] PHP Database Abstraction Layer

2003-02-06 Thread Maxim Maletsky

"Luke Woollard" <[EMAIL PROTECTED]> wrote... :

> I once read a great article in the first or second issue of
> http://www.phparch.com/ on database abstraction layers. At which point I
> used the tutorial as a starting point for creating a very similar structure
> I named dbWave. There are only minor differences and a postgresql driver is
> now included for the most common pg_* functions.
> 
> I was just wondering if anyone has developed a database abstraction layer
> that allows you to separate your SQL queries from your application logic
> like dbWave does? I'm looking for a more advanced way of doing this?
> 
> 
> Attached is dbWave for anyone to look at/use. To run it you need to use the
> following tags in your file:
> 
>   // DBWave include files
>   include( "[attached_filename].php" );
> 
> To instantiate the dbWave object you use the following code in a file name
> connect.php
>  
>   /* This file instantiates dbWave using our chosen API */
>   /* It is automatically generated by the database setup program */
> 
>   // Instantiate dbWave using the MySQL API
>   $dbWave = new Mysql();
> 
>   // Connect to the database
>   $dbWave->connect( 'yourhost', 'yourport', 'yourdbname', 'yourdbuser',
> 'yourdbpass' );
> ?>


ZoomStats uses it: http://sf.net/projects/zoomstats

P.S: I wrote that phparch article, and I based it on my ZoomStats
experoence which I also founded.


--
Maxim Maletsky
[EMAIL PROTECTED]


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




Re: [PHP-DB] PHP database

2002-07-15 Thread Rick Widmer


>>Hello
>>
>>I'm to have database, but server's administrator refuses to install MySQL
>>nor PHP MySQL support :( He told me he won't install it and I should use
>>textfiles if I want to have database.


Sounds like time too find another hosting provider.


Rick


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




Re: [PHP-DB] PHP database

2002-07-15 Thread Steve Farmer

Hi,

I would try to convince the admin that a DB like MYSql (which is 
actually part of the standard install under Redhat now) is much more 
secure than storing data in text files !!

HTH
Steve

At 11:02 AM +0200 15/7/02, Tomator wrote:
>Hello
>
>I'm to have database, but server's administrator refuses to install MySQL
>nor PHP MySQL support :( He told me he won't install it and I should use
>textfiles if I want to have database. I don't want to write engine to
>textfiles, so...
>
>Can You point where can I find PHP code which realize basic database
>functions without installing any not standard functions nor modules on
>unix/linux server?
>
-- 
-
"Minds are like parachutes, they work best when open"
Support free speech; visit http://www.efa.org.au/

Heads Together Systems Pty Ltd http://www.hts.com.au
Email: [EMAIL PROTECTED] Tel: 612 9982 6767 Fax: 612 9981 3081 

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