User Profile

Collapse

Profile Sidebar

Collapse
jasone
jasone
Last Activity: Mar 13 '08, 10:41 PM
Joined: Mar 21 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jasone
    started a topic Problem counting rows in two tables

    Problem counting rows in two tables

    hey, this is what ive got so far:

    Code:
    ("SELECT (Select count(*) from tbl_flight_details) + (select count(*) FROM tbl_flight_departures) as grandtotal")
    i need to count all the records in the above 2 tables, following this query i need to count all the records depending on a certaion value... at the moment ive got them counting from just one table which is fine.

    Code:
     rs6=cn.execute ("Select
    ...
    See more | Go to post

  • jasone
    started a topic sum recordsets -please help

    sum recordsets -please help

    hi,

    i suppose this is a pretty simple thing, i am unsure how to proceed though.

    i have 2 recordsets counting items ifrom 2 tables how would i then add these recordsets together.

    the recordsets ive used are shown below

    Code:
    set rs1=cn.execute ("Select count(*) as cardifarrivals from tbl_flight_details WHERE arriving_airport ='cardiff'") 
    
    set rs=cn.execute ("Select
    ...
    See more | Go to post

  • jasone
    replied to Record counting in a database
    problem solved... used this nice bit of code, to select what i want to count

    Code:
    <% 
    Dim cn,cm 
    Set cn = Server.CreateObject("ADODB.Connection") 
    cn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="& Server.MapPath("airlines.mdb") 
    set rs2=cn.execute ("Select count(*) as cardiffflights from tbl_flight_details WHERE arriving_airport ='cardiff'")
    ...
    See more | Go to post

    Leave a comment:


  • jasone
    started a topic Record counting in a database

    Record counting in a database

    Hey all,

    i need to do a number of record counts on one table, for value matching a certain criteria,

    to do for this page i have no database connection, recordset etc, i am a little confused where to start.

    so basically i have a table of flights... and i want to show a table in asp stating that there are so many flights to london, so many flight to cardiff and so on...

    please help!
    See more | Go to post

  • jasone
    replied to how to create a delete loop?
    problem solved... though i did it a different way, i will post the working script here shortly... a bit of work to do first
    See more | Go to post

    Leave a comment:


  • jasone
    replied to how to create a delete loop?
    many thanks for your response, though im getting the error :

    Type mismatch: 'LBound'
    /ddwassignment3/delete_tester.a sp, line 8
    See more | Go to post

    Leave a comment:


  • jasone
    started a topic how to create a delete loop?

    how to create a delete loop?

    Hi ive got checkbox options going to a page and then being listed, i now want to delete what has been selected, im guessing this needs to be done through some kind of loop?

    the code i have so far on the delete page is as follows :

    Code:
    <%
    Dim flight_id
    flight_id = Request.Form("flight_id")
    
    if flight_id="" then
       Response.Write "You did not select a
    ...
    See more | Go to post

  • so im guessing i just need to write a loop now to delete each one... any ideas on how to wrote this... anyone?
    See more | Go to post

    Leave a comment:


  • i have changed the form code slightly to the one shown below :

    Code:
    <form name="delete" method="GEt" action="delete.asp?flight_id=<%=(rssearchcnx.Fields.Item("flight_id").Value)%>" >
    See more | Go to post

    Leave a comment:


  • Hey, i finally go the values selected to be printed out in the variable "flight_id" and it shows all the ones selected, seperated with a comma.

    whats the next step to get this working? :-S...
    See more | Go to post

    Leave a comment:


  • i forgot to say im using checkboxes.. so there is no need for the delete text next to each record
    See more | Go to post

    Leave a comment:


  • Hi thanks for your response, a little unsure where to put this data, is it possible for you to insert the script into the script i have already posted, and then post it back on here?

    many many thanks

    jason
    See more | Go to post

    Leave a comment:


  • Hi, im unsure of this, is there anyway to check...
    See more | Go to post

    Leave a comment:


  • i think problem lies with SQL statement, please view and assist

    Hi all,

    im nearly there with this one and im sure it shouldnt be hard to solve, i just cant seem to find the solution.

    ive got records being displayed, the user can then tick what records to delete... click delete.. it shows deleted records then you can go back to the screen, It works if one record is selected but any more it doesnt delete any so im sure there is a problem with my SQL statement.

    the code...
    See more | Go to post

  • Problem deleting multiple rows - Nearly there, PLEASE HELP

    Hi all,

    im nearly there with this one and im sure it shouldnt be hard to solve, i just cant seem to find the solution.

    ive got records being displayed, the user can then tick what records to delete... click delete.. it shows deleted records then you can go back to the screen, It works if one record is selected but any more it doesnt delete any so im sure there is a problem with my SQL statement.

    the code...
    See more | Go to post

  • jasone
    replied to Inserting multiple rows of data in table
    I take my hat off to you once again ronald!

    if you need any help in the future... you know where i am ;-)

    hehe! maybe one day!
    See more | Go to post

    Leave a comment:


  • jasone
    replied to Inserting multiple rows of data in table
    [PHP]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitl ed Document</title>
    </head>

    <body>
    ...
    See more | Go to post

    Leave a comment:


  • jasone
    replied to Inserting multiple rows of data in table
    lol, nothing wrong with you, you are a legend in my eyes!

    though for some reason now it doesnt like the curly brackt on line 21...

    if i show you the entire code and the error, any chance you can see why?

    error :

    Parse error: syntax error, unexpected '}' in C:\web\Apache2\ htdocs\universi ty\FinalYearPro ject\testing folder\choice.p hp on line 21

    code:

    [PHP]<?php...
    See more | Go to post

    Leave a comment:


  • jasone
    replied to Inserting multiple rows of data in table
    hi, tried taking that out.. still getting this error:

    INSERT error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '3,wewrwe' at line 1

    for this line of code:

    [PHP] if (!mysql_query ("INSERT INTO orders (flowerid, flowername) VALUES ".$row['flowerid'].",".$row['flowername']))[/PHP]
    See more | Go to post

    Leave a comment:


  • jasone
    replied to Inserting multiple rows of data in table
    ok problem solved.. was missing a closing bracket...

    just getting this error now, but i will try and solve this... :-)

    INSERT error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''flowerid', 'flowername') VALUES (3,wewrwe' at line 1
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...