Activity Stream
48,167 MEMBERS
61087 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 9 of 9
  1.     
    #1
    Member

    Default SQL query help

    Hi,

    I made a table dist_obj .



    I havent put the 1st row details as i have not made any constraints on any row.

    so it got left blank. So can u tell me how to update and insert to 1st row ?
    and also delete it.

    waiting for reply.
    googleplus Reviewed by googleplus on . SQL query help Hi, I made a table dist_obj . http://i39.tinypic.com/n37n6w.png I havent put the 1st row details as i have not made any constraints on any row. so it got left blank. So can u tell me how to update and insert to 1st row ? and also delete it. Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    This site is using a hacked database of W junction
    Last edited by Gavo; 4th Jan 2015 at 02:28 PM.

  4.     
    #3
    Member
    bro i know this.. but

    i haven't entered any data in 1st row.. so how to i compare with where clause ?

    please write a query.

  5.     
    #4
    Respected Developer
    Website's:
    wrzc.org
    INSERT INTO dist_obj (Dno, Dname, Daddress) VALUES (1, 'Yahoo', 'Funeral Home');

    As your setting the number as 1 it will appear before Google and Bing as they are 12 and 13. You can also enter the below as an example.

    INSERT INTO dist_obj (Dno, Dname, Daddress) VALUES (4, 'Ask', 'forgotten about');


    You can delete yahoo as follows

    DELETE FROM dis_obj WHERE Dno = 1

    or as

    DELETE FROM dis_obj WHERE Dname = 'Yahoo'

    Hope this helps
    Tutorial How to SEO your Warez Site a guide to help you increase your organic traffic

    Huge list of Warez Sites and free Multiposter Templates

  6.     
    #5
    Member
    but @Mr Happy : I havent entered any data on first row .. as no constraints are there.

    so how can i compare with where clause ?

  7.     
    #6
    Respected Developer
    Website's:
    wrzc.org
    I'm sorry I don't follow you. Can you give an example of what your trying to do.

    Do you mean if something doesn't exist insert something? It that what you mean?
    Tutorial How to SEO your Warez Site a guide to help you increase your organic traffic

    Huge list of Warez Sites and free Multiposter Templates

  8.     
    #7
    You can call me G
    OP: Usually the ID field is NOT NULL. Can you confirm that same is the case here as well or not?



    My Langotiya Yaars (Chaddi buddies): JmZ, humour, Chutad, Esotorisk, l0calhost, Daniel, Mind Freak?, TLK, Amz

  9.     
    #8
    Member
    Website's:
    sborg.us
    UPDATE dist_obj SET Dno = 11, Dname = 'test', Daddress = 'testing' WHERE Dno is null;

    DELETE FROM dist_obj WHERE Dno is null;


    V3g3ta | Halcyon | Abhi

  10.     
    #9
    Member
    Website's:
    serverworldwide.com seedcafe.info
    is it mysql or msaccess

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PHP - CSV query
    By ElitePirate in forum Web Development Area
    Replies: 3
    Last Post: 14th Sep 2012, 02:35 PM
  2. OVH Query?
    By BJ@008 in forum Hosting Discussion
    Replies: 11
    Last Post: 17th Feb 2012, 03:33 PM
  3. FTP Upload Query
    By Ryan in forum File Host Discussion
    Replies: 1
    Last Post: 16th Jan 2012, 03:03 PM
  4. ddl submission query
    By avRo in forum Forum and DDL Discussion
    Replies: 4
    Last Post: 19th Nov 2011, 05:39 PM
  5. php mod query
    By Ryan in forum phpBB
    Replies: 3
    Last Post: 28th Mar 2009, 10:49 PM

Tags for this Thread

BE SOCIAL