User Profile

Collapse

Profile Sidebar

Collapse
mtgriffiths86
mtgriffiths86
Last Activity: Mar 30 '08, 11:45 AM
Joined: Jan 18 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • mtgriffiths86
    started a topic Avoiding duplicate records

    Avoiding duplicate records

    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
    See more | Go to post

  • 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
    See more | Go to post

    Leave a comment:


  • mtgriffiths86
    started a topic Changing image depending on textbox data

    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
    See more | Go to post

  • mtgriffiths86
    replied to format date time in Access / ASP
    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:

    Code:
    objRecordset.Open "SELECT * FROM Flights_Query ORDER BY Depart_Time ASC",objConnection
    The field that i am trying to display is How_Long.

    Hope...
    See more | Go to post

    Leave a comment:


  • mtgriffiths86
    started a topic format date time in Access / ASP

    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],
    ...
    See more | Go to post

  • mtgriffiths86
    replied to League Table
    in PHP
    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?

    Thanks
    See more | Go to post

    Leave a comment:


  • mtgriffiths86
    replied to Removing Items from a shopping cart
    in PHP
    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"],...
    See more | Go to post

    Leave a comment:


  • mtgriffiths86
    replied to Removing Items from a shopping cart
    in PHP
    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...
    See more | Go to post

    Leave a comment:


  • mtgriffiths86
    replied to Removing Items from a shopping cart
    in PHP
    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 again
    See more | Go to post

    Leave a comment:


  • mtgriffiths86
    started a topic Removing Items from a shopping cart
    in PHP

    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...
    See more | Go to post
    Last edited by Atli; Jan 19 '08, 09:54 PM. Reason: Added [code] tags.

  • mtgriffiths86
    replied to League Table
    in PHP
    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",...
    See more | Go to post

    Leave a comment:


  • mtgriffiths86
    replied to League Table
    in PHP
    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.
    ...
    See more | Go to post

    Leave a comment:


  • mtgriffiths86
    started a topic League Table
    in PHP

    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...
    See more | Go to post
No activity results to display
Show More
Working...