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
StateID in
the column reads. How can I correct this? The form to insert and
edit have
the below code and correctly insert the StateID
What exactly is happening? Run the script, do a View Source on the
resulting page; show us the HTML generated.
-Original Message-
From: Steve Fitzgerald
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
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
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 get no errors. I have
also
tried using FieldName= '$F
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
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
Line 14 is: '$FirstName', so the er
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,
This should be a simple insert. I must be missing something because I keep
getting: Couldn't execute query.
What am I missing?
?
error_reporting(15);
$db_name = dbname;
$table_name=company;
$connection = @mysql_connect(servname,username, password)or die
(Couldn't connect.);
$db =
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
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 = \$Title\,
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
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
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
?
$db_name=testDB;
$table_name1 = my_contacts;
$table_name2= company;
$connection = @mysql_connect
=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 appreciated.
Steve
16 matches
Mail list logo