Russell,
I am contemplating a Historical Database
I barely can spel redundant let alone normalize so I am handicapped.
The aim is to enter a name only once. I am studying linking tables.
In the [Contact]
idContact
First_Name,Last_Name,Middle,Suffix,Full_Name,idCity,idState,City_State,i
Jennifer: Did you ever get your If else Question answered?
On Mon, 25 Mar 2002, Jennifer Downey wrote:
Hi all,
I have a table called pets, here is a partial dump:
At this time this is all I am working with.
uid int(10) NOT NULL default '0',
num_pet tinyint(1) NOT NULL default '1',
Have you looked at or download the mysql.pdf.which is pretty clear and
consise. If you would like to look at other sites go to www.php.net and on
the top part click on links. There around the middle of the page you will
find PHP tutorials. Any place that has PHP tutorials will probably have
Simple do these checks and you'll be sweet as a nut
Adam
?php
$sql = SELECT nickname FROM tblUsers WHERE nickname = '$nickname'';
$result = mysql_query($sql);
$sql = SELECT email FROM tblUsers WHERE email = '$email';
$result2 = mysql_query($sql);
if (mysql_num_rows($result)){
Hi Dave,
I am trying to create a registration area that uses a nickname and
email
pair.
I need both to be unique.
So how do I that either do not already exist then if unique insert
into
db.
if nickname exist then error = sorry...
if email exist then error = sorry...
else must be unique
Adam,
Thanks for the assist.
The query works fine without the ( ) arount the conditions.
Now on to the next part.
George
- Original Message -
From: Adam Royle [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, March 26, 2002 10:03 PM
Subject: [PHP-DB] Re:
I have the below code that populates a drop down list. The code will
correctly insert the value $StateID into another a table. The problem I am
running into is that when I select the record to edit the drop-downlist has
the first option as the value instead of what the corresponding StateID in
I'm trying to decipher:
when I select the record to edit the drop-downlist has
the first option as the value instead of what the corresponding
StateID in
the column reads. How can I correct this? The form to insert and
edit have
the below code and correctly
If I understand your question, when editing an existing record where
StateID = CA, you want the drop-down to show California as
selected.
You need to add a little code into your while loop to echo SELECTED
into the appropriate option tag.
-Dan
--- Steve Fitzgerald [EMAIL PROTECTED] wrote:
I
Hi,
I am using a small php script to return records from an oracle8.1.6
database. I would like to have one of the columns contents display the data
as a hyperlink and I am not quite sure how to do it. Here is the code that
returns the data (which is correct). The table formatting is the issue.
Hi,
I'm having some big problems even running any
mysql_connect commands. I get the results at the
bottom of this e-mail from running a simple
mysql_connect command. Some things to consider are
that I'm accessing my web site through port 8080, and
I'm not sure what username, password, or
Wow I'm amazed and thankful for such help and advice
I thought I would attack this project piecemeal but that will not give a
clear view that will allow helpful comment without the full view.
I have a website at http://geocities.com/efoxfiles a labor of love
So now it has become so detail
You need to ensure that mysql.sock has the correct read-write-execute
permissions
Check the mail list archives; this question is asked and answered EVERY week
-Original Message-
From: Liam Gibbs [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 1:17 PM
To: [EMAIL PROTECTED]
What are you trying to link to?
Most likely you need to pass a few variables in the
URL
This should give you an idea:
echo TDA
HREF=whateverpage.php?var1=$var1record=$column_value$column_value/ATD;
olinux
--- Franden, Craig [EMAIL PROTECTED]
wrote:
Hi,
I am using a small php script to
Hi All
I will try and explain as clearly as I can
I have a message board type of script.
User logs in = no prob
User posts message = No prob can see message on db and retrieve a list
of new posts.
Now the prob.
I am to reply to the message via an admin area by selecting the
show you code and db table struct
-Original Message-
From: Dave Carrera [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 2:38 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Very wierd problem ;-(
Hi All
I will try and explain as clearly as I can
I have a message board
Just some advice... You should use a consistent programming style,
especially with PHP. You can read some guys advice here.
http://www.phpbuilder.com/columns/tim20010101.php3?page=1
Some of the advantages of having a consistent style, is when you are
looking for bugs. If you look over your
Hi to all,
I'm new to PHP. I'm trying to retrieve data from a database, but I just want
to retrieve one record at a time and go through to the next records by click
next record. I know how to retrieve all record by using the
mysql_fetch_array, but I'm having problems to select one record at time.
Hi all!
I have two tables. One have the primary key, that is referenced in
the second. When I have to insert a record in both tables, I do this in
the first, following a select to catch the primary key generated. So
then I insert the rest of data in the second table, with the value
Hi to all,
I'm new to PHP. I'm trying to retrieve data from a database, but I just
want to retrieve one record at a time and go through to the next
records by click next record. I know how to retrieve all record by
using the
mysql_fetch_array, but I'm having problems to select one record at
This is the entire code for the page edit_race.php
?php
// editrace.php - edit race results
?
?php
// includes
include(../includes/config.php);
include(../includes/functions.php);
// open database connection
$connection = mysql_connect($host, $user, $pass) or die (Unable to
connect!);
Ok, I've spent some time reading the docs at php.net and I'm still confused.
After a couple hours, I have an include file working with a statement like:
include (dblib.inc);
However, to add to my confusion, I've got a second include file statement on
the next line:
include (userlib.inc);
And
Hi All,
This is strange. I've got some functions I want to include in my PHP
documents. Well, I can never get anything to work if I include the file
that holds the functions, but, if I insert the functions into the PHP
document in question, everything works??
Now, I've checked to ensure that
i'm having trouble telling php to format the output of a mysql query correctly. i
not only want to loop the output in simple table rows (meaning that php parses one
result per row), instead i want php to parse two results per row in different
td's. no clue what i'm talking about? take my
did the tabs get stripped in your mail, or is there a reason the code
couldn't be written like the following?
i'm curious, since this is the way i do 90% of my code - makes it easy to
see what's going on... but i dunno about performance or parsing impact
(never gave it much thought until
did you start each include file with:
?php
?
If not, PHP treats the code within as straight text
-Original Message-
From: Brad Melendy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 5:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] include() statement hell!
Ok, I've spent
try using your id column of the table
Select * from table where table_id=1
using mysql_fetch_array with the above query will work.
Mike
- Original Message -
From: Natividad Castro [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 27, 2002 5:04 PM
Subject: [PHP-DB]
#1. You may want to double-check the path where you're calling it from in
case you're working with subdirectories.
Let's saying you access a page at www.domain.com/page.php which calls
www.domain.com/includes/header.inc.
Then, header.inc includes the dblib.inc file at
Hello all,
I'm trying for the first time to use a dynamically created popup menu from a
mysql database. The menu is of (article) writers' names and will be used in
a select query.
Using snippets of code I've gleaned from here and the mysql list, I've the
popup working fine but I'd like to
The easiest way...
$getlist = mysql_query(SELECT distinct Writer FROM stories);
echo select name=\WriterName\\n;
echo option value='All'Search All/option;
while ($row = mysql_fetch_array($getlist)) {
echo ' option value='.$row[Writer].''.$row[Writer]./option\n;
}
echo /select\n;
G'day szii,
The easiest way...
$getlist = mysql_query(SELECT distinct Writer FROM stories);
echo select name=\WriterName\\n;
echo option value='All'Search All/option;
I love simple solutions:)
Cheers and many thanks
kim
--
PHP Database Mailing List (http://www.php.net/)
To
Hi Rick,
Yes, this is the first thing I checked. Thanks for your suggestion.
...Brad
Rick Emery [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
did you start each include file with:
?php
?
If not, PHP treats the code within as straight text
-Original
Thanks Jonathan,
I'm trying to include a file /includes/dblib.inc from /main/page.php. In
/main/page.php I use include(includes/dblib.inc);. When that didn't work,
I tried copying the file to /main/ and including it there and that didn't
work either. Finally, I tried adding a specific path to
Thanks for the advice
So reflecting what advice I have received to date:
Assuming that the Contact table would be used for:
Owners, Breeders, Sportsmen, Ancestors, Associations, and a myriad of
other categories of mankind, would the following normalization be
prudent?
ContactID
Has anybody told him to check his PHP.INI???
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 6:28 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] include() statement hell!
#1. You may want to double-check the path
At 22:41 3/27/2002 -0600, Dan Brunner wrote:
Has anybody told him to check his PHP.INI???
How about adding the following to httpd.conf:
php_value include_path .:/usr/share/php:/path/to/webpages
--Photocon
Conrad Hunziker III
www.nightskyent.com
--
PHP Database Mailing List
Hello,
I am attempting to POST to a https://whatever.url.com server and return
the result from the server into the script without the user knowing using
a php script. I can not use CURL becuase the shared server I have hosting
this site was not compiled -with-curl. I downloaded HTTP_POST PHP
I am thinking about providing real time web access to our coach reservations
system.
The reservations system is on Foxpro2.6 on a SCO Unix 5.0.2 server.
I am considering setting up the web server with FreeBSD, Apache and PHP.
Our reservations system is used by up to 60 operators almost 24
Does FoxPro have an ODBC module?
I'm in the midst of putting a web front-end on an Access database; we've
put MySQL as the back end to Access using the ODBC connection. Then PHP
can process queries on the MySQL db and the local operators see it as an
Access db.
We first tried PostgreSQL
The thing that sucks about having to rely upon the php.ini file is that the
you must use a particular folder for all your include files, even if you are
using files for several different sites. It makes much more sense to be
able to put your include files for a particular site in that site.
I'm trying to update my MySQL database, but it doesn't seem to be taking.
my code is:
mysql_query(update prod_list set prod_manu=$prod_man where sku='$prod');
where
prod_manu is an int
$prod_man is an int
sku is a varchar
$prod is text
mysql_query() comes back successful, and
I'm trying to update my MySQL database, but it doesn't seem to be taking.
my code is:
mysql_query(update prod_list set prod_manu=$prod_man where sku='$prod');
Try: mysql_query(update prod_list set prod_manu='$prod_man' where
sku='$prod');
Maxwell
--
PHP Database Mailing List
On Thursday 28 March 2002 14:58, Brad Melendy wrote:
How is this different than using the php.ini file?
Photocon [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
At 22:41 3/27/2002 -0600, Dan Brunner wrote:
Has anybody told him to check his PHP.INI???
Jason a écrit :
I'm trying to update my MySQL database, but it doesn't seem to be taking.
my code is:
mysql_query(update prod_list set prod_manu=$prod_man where sku='$prod');
where
prod_manu is an int
$prod_man is an int
sku is a varchar
$prod is text
mysql_query()
44 matches
Mail list logo