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
the
or="#cc">
<td valign="middle" height="25" class="raceresutlstitle"
bgcolor="#cc">Race
Report:</td>
<td valign="middle" bgcolor="#cc">
<textarea name="RaceReport" cols
I'm trying to query my database to fill in data First Name Last Name. Using
the script below I get (depending on the ContactID I enter)
Contact: 1 1 or 2 2
If ContactID=0 I get
Contact:
Any ideas on what I am doing wrong?
Thanks.
Steve Fitzgerald
\n", mysql_result($result
(depending on the ContactID I enter)
> >
> > Contact: 1 1 or 2 2
> >
> > If ContactID=0 I get
> >
> > Contact:
> >
> > Any ideas on what I am doing wrong?
> >
> > Thanks.
> >
> > Steve Fitzgerald
> >
> > >
ve=no which would indicate the contact
is no longer active). I would then like to have the result(s) to have a link
to their respective ContactID.
I don't think this is that difficult, but I'm having difficulty applying the
SELECT statement with the text box.
Any help would be greatly appr
I seem to be having difficulty creating a hypertext link between the results
of a sql query, ie a a formated page with a contact record (FirstName,
LastName, etc.) to a page that will allow for editing. The results page is
text only and the edit/update page has text boxes.
Not sure if this clear,
I'm trying to insert data into two separate tables using 1 INSERT. The code
below represents a first crack at it, but I can't seem to figure out how to
get this to work properly.
Thanks.
Steve
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
I've figured out (with some help) how to query two tables at the same time.
In order to get a corresponding CompanyName with a specified ContactID I
created a SQL query that selects both tables ($table_name1,$table_name2) and
then selects contacts.CompanyID = '$CompanyID'. The result is a match fo
I'm trying to create a join statement that pulls out a CompanyName based
on a given CompanyID that is tied to a specified ContactID.
For example, if ContactID=1 then the corresponding CompanyName might be
Smith, Inc. depending on what was entered.
Here are the tables.
table = Contacts
-
I'm trying to create an INSERT statement that will change a field in one
table based upon the id defined in another table.
Here is what I tried:
$sql1 = "INSERT INTO $table_name1 (FirstName,LastName,WorkPhone,
HomePhone,EmailName,Birthday)
VALUES
('[$FirstName]','[$LastName]','[$WorkPhone]','[$H
This should be a simple insert. I must be missing something because I keep
getting: Couldn't execute query.
What am I missing?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list
What is the best method for avoiding multiple ids for the same information.
For example: I have a table name company that has unique ids. The CompanyID
are tied to a table name contacts which have unique ids (ContactID). The
problem seems to be that if I add a contact with an existing CompanyName
I belive this UPDATE should work, but it isn't. I get no errors. I have also
tried using FieldName= '$Fieldname', but that does not seem to work either.
$table_name = "contacts";
$update_contact_sql = "UPDATE $table_name
SET
FirstName =\"$FirstName\",
LastName = \"$LastName\",
Title = \"$Titl
"Steve Fitzgerald" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I keep getting the following SQL error:
>
The last fieldname is CompanyID not ContactID.
You have an error in your SQL syntax near ')' at line 14
&g
I keep getting the following SQL error:
You have an error in your SQL syntax near ')' at line 14
Line 14 is: '$FirstName', so the error must correspond to a different part
of the code.
Any ideas?
$add_contact_sql = "INSERT INTO $table_name
(ContactID, FirstName, LastName, Title, WorkPhone,
Hom
and gave the ContactID a value which worked fine. I'm not
sure why the query string is not passing the value.
"Steve Fitzgerald" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I belive this UPDATE should work, but it isn't. I ge
I'm trying to build a menu page that builds links based upon specified
permissions that are associated with a username or userid. I figure it might
be best to associate individual privleges to specific menu items within the
usertable (using checkboxes, etc). then building the menu based upon the
I'm trying to list the results of a query, but I keep getting the following
error:
Parse error: parse error, expecting `T_STRING'
or `T_VARIABLE' or `T_NUM_STRING'
I must be missing something because I can't
find what's causing the pars
I'm trying to display a summary list of calls with one attribute being
CallType. I have CallType and CallTypeID defined in a table name calltypes.
The problem I am having is taking the output of CallID defined in calls and
having the script match the CallTypeID to the CallType. If I run the
displa
19 matches
Mail list logo