Results 1 to 2 of 2

Thread: Check if database or table exists

  1. #1
    PerrySullivan is offline Senior Member
    Join Date
    Dec 2009
    Posts
    209
    Rep Power
    3

    Default Check if database or table exists

    I am learning PHP programming language and mysql .I am trying to creating pages for my project. I try to create it but fails to so. Also I want to enter doc file field that matches the record trying to enter into database. If you are having any suggestions then reply me. It can helpful to me.

  2. #2
    RussellBarnes is offline Senior Member
    Join Date
    Dec 2009
    Posts
    214
    Rep Power
    3

    Default

    Refer following code to check if database or table exists. Try to understand following code which is helpful for you. It is very simple.

    Code:
    The syntax for mysqldump : mysqldump --add-drop-table dbname tablename 
    also
     = mysql_query ("SELECT * FROM `tableName` LIMIT 0,1"); /* >>limit<< is just to make it faster in case the db is large */
    if (){
    query was correct and could be executed by the server
    }else{
    // something wrong, so:
    // create the table
    }

Similar Threads

  1. Virus in practical Image - Exists?
    By AdamsClark in forum General Internet Terms
    Replies: 1
    Last Post: 03-19-2010, 05:38 PM
  2. Difference among delete table & prune table
    By MorganCooper in forum Programming
    Replies: 1
    Last Post: 02-10-2010, 04:22 PM
  3. Database Normalization in SQL Database
    By Millerjames in forum Programming
    Replies: 1
    Last Post: 01-23-2010, 03:17 PM
  4. (C) + + Table Structure
    By willi in forum Programming
    Replies: 4
    Last Post: 11-16-2009, 11:57 AM
  5. Make a feed where none exists
    By siktan5775 in forum Everything Else
    Replies: 0
    Last Post: 06-24-2008, 10:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48