Hi All,
What i am trying to do is avoid inserting duplicate records into a database. I am inserting the records using a webpage but when i enter a flight number(primary key) that already exists i get an error and system crashes.
What i want to do is if a duplicate record is about to be entered then redirect the user to another page. Is this possible
Thanks in advance
Matthew
User Profile
Collapse
-
Avoiding duplicate records
-
I have a folder called images that contain all the images that i want to use.
I am using IE7 and not firefox at the moment.
All i have is a simple form containing text boxes and one input file type.
I cannot think of a way to get the value in img src tags:
<img src"TextboxValu e">
Thanks
Matthew -
Changing image depending on textbox data
Hey All,
I am looking to have an image display depending on the text inside a text box.
The text is appearing in the format example.jpg so it would be able to work in theory.
What i cannot do it make it so that the image show is the image specified in the text box. Is this possible?
Thanks in advance
Matthew -
Hi,
The error that i am getting is:
Error Type:
Microsoft JET Database Engine (0x80040E14)
Undefined function 'FormatDateTime ' in expression.
/assign3/Departures.asp, line 46
Line 46 has the code:
The field that i am trying to display is How_Long.Code:objRecordset.Open "SELECT * FROM Flights_Query ORDER BY Depart_Time ASC",objConnection
Hope...Leave a comment:
-
format date time in Access / ASP
I have created a query using Microsoft access that will work out the difference between a time that i enter into the database (HH:MM:SS) and then to take away the current time.
I have this working inside the access database but i cannot take it from the database and display the result in my webpage.
The SQL query i get after creating my query in access is:
...Code:SELECT Flights.Depart_Time, Time() AS [Current_Time],
-
I have now tried different approaches to this and have come up with a new error which is
Resource 5 error
Does anybody know how to do what i am trying and what these errors are?
ThanksLeave a comment:
-
Thanks for the post.
I have tried creating a new function as stated but have no joy.
This maybe pointless but i am going to include all of the code that i am using. Maybe that would help.
[PHP]
<?php
include("db.php ");
switch($_GET["action"])
{
case "add_item":
{
AddItem($_GET["id"],...Leave a comment:
-
I hope this is correct and what you wanted.
[PHP] // Remove the item from the users cart
RemoveItem($car _id);
}
else
{
mysql_query("up date cart set qty = $qty where cookieId = '" . GetCartId() . "' and car_id = $car_id");
}
}
function RemoveItem($car _id)
{
// Uses an SQL delete statement to remove an item from...Leave a comment:
-
Thank you for your response
I think that the code that you are looking for is this:
[PHP]@mysql_query("i nsert into cart(cookieId, car_id, qty) values('" . GetCartId() . "', $car_id, $qty)");[/PHP]
hope this helps you to help me lol
Thanks againLeave a comment:
-
Removing Items from a shopping cart
Hi All,
I am trying to remove all items from my shopping cart but am having problems.
I can remove individual items by using clicking a link which runs this piece of code:
[code=html]
<a href="ShoppingC art.php?action= remove_item&id= <?php echo $row["car_id"]; ?>">Remove</a>
[/code]
My problem is that i want to include a link that when clicked... -
This is what i am currently trying to use.
<?php
//opening the database
$host="localhos t"; // Host name
$username="root "; // Mysql username
$password=""; // Mysql password
$db_name="leagu e_table"; // Database name
$tbl_name="leag ue_2"; // Table name
// Connect to server and select databse.
$link=mysql_con nect("$host",...Leave a comment:
-
Thanks for the replies...
Firstly there are 3 leagues with say 6 teams in each league.
To work out what teams are playing weekly i want to automatically work it out by how many points they have. For example:
1st vs 2nd
3rd vs 4th
5th vs 6th
The following week will be
1st vs 3rd
2nd vs 5th
3rd vs 6th
and so on like that.
...Leave a comment:
-
League Table
Where do i begin...well
I am attempting to build a league management website that will automatically work out league tables, fixtures and results.
The first problem that i have is this:
To automaticaaly work out the fixtures i plan on having the highest point scorers from the previous month to play against the 2nd highest point scores and 3rd v 4th and so on.
Im not sure how to take the...
No activity results to display
Show More
Leave a comment: