Create a database from scratch using php.

Is it possible to create the usernames and databases for
mysql using a php script, or can this only be done using
phpmyadmin.
if it can how.
thanks

Sure, you should be able to execute ddl command from a php
script. Why do you want to?

Similar Messages

  • How to create database from scratch using user input

    what I am trying to do is to create database via my java code (using hibernate and my sql) and based on user input.
    The details like the name of table.... or the number of columns in it are all supposed to be determined from user input (only the first time).
    On subsequent run the program should remember the previously created database and hence work with it.
    Can somebody help me through this?
    Suppose I did create it using firing queries from my program then the next problem is how my program would start up next time......?????

    Anuvrat wrote:
    what I am trying to do is to create database via my java code (using hibernate and my sql) and based on user input.
    The details like the name of table.... or the number of columns in it are all supposed to be determined from user input (only the first time).
    On subsequent run the program should remember the previously created database and hence work with it.
    Can somebody help me through this?Presumably because you want to (fun) rather than because you need to (job or project.)
    If the second then don't do it.
    >
    Suppose I did create it using firing queries from my program then the next problem is how my program would start up next time......?????You would start by learning about DDL which is the common name for the languages, which vary by database, used to create the entities that represent the structure of a database. Until you figure out the syntax of that you can't do anything in java.

  • A Fluid Gallery from MySQL using PHP and various column widths

    I have decided to try the new Fluid Layout option in Dreamweaver. I pull information from a database (MySQL) and use php to present it.
    To show a gallery, I would pull the info and use the repeater code, and something like Tom Muck's horizontal repeater script to create a gallery. The images need to be shown with other text-based information (not just a caption). However, the HR script is a set amount of columns - and I want the number of columns to change depending on the width of the browser.
    So it's more than just a gallery - pulling images from a database with Title = "x" these would be a repeated stylised DIV with multiple texts fields and styles within.
    Let's take the example of a car dealership website it must show the car image, year, prices, description etc all in different style fonts so it can just be a caption to the image.
    So the options are:
    A fixed number of columns for each width: Monitor 5, Tablet 3, Mobile 1. Can this be achieved by having a "IF" statement in the actual code, if width = x use this version of the Horizontal Repeater?
    A fluid version that has 6 columns and as you slide the browser's width you can see the gallery's width has less columns until it reaches 1 for mobile.
    The fluid version would be better.
    Any links to a tutorial or example would be most appreciated.
    Many thanks
    HVR

    The only issue with using <divs> instead of a table to create your grid columns is that you will have to set a minimum height on the <divs> to keep them all at the same depth,much like a table cell construction looks and behaves. If you don't set a minimum height the grid will look all ragged PLUS the very big drawback is the <divs> won't clear if another <div> has more content in it which is going to happen if you include a 'description' of the car as this will never be the same length unless you are prepeared to edit the text.
    See fluid sample below: You can just populate the <divs> from your database and loop through them
    <!DOCTYPE HTML>
    <html>
    <head>
    <title>Untitled Document</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
    body {
        font-family: verdana;
        font-size: 13px;
    #pageWrapper {
        width: 98%;
        max-width: 980px;
        margin: 0 auto;
        overflow: hidden;
    .imageDetails {
        width: 22.5%;
        float: left;
        margin: 0 0 15px 2%;
        background-color: #CCC;
        padding: 8px 0;
        min-height: 200px;
    dl {
        margin: 0 8px;
        padding: 0;
    dt {
    float: left;
    width: 50%;
    padding: 0 0 5px 0;
    dd {
    text-align: right;
    padding: 0 0 5px 0;
    h3 {
        font-size: 13px;
        margin: 0;
        padding: 8px 8px 5px 8px;
    p {
        margin: 0;
        padding: 0 8px;
    @media screen and (max-width: 760px) {
    .imageDetails {
    width: 30%;
    float: left;
    margin: 0 0 15px 2%;
    background-color: #9F3;
    @media screen and (max-width: 480px) {
    .imageDetails {
    width: 45%;
    float: left;
    margin: 0 0 15px 2%;
    background-color: #FC9;
    @media screen and (max-width: 320px) {
    .imageDetails {
    width: 100%;
    float: none;
    margin: 0 0 15px 0;
    background-color: #9CC;
    </style>
    </head>
    <body>
    <div id="pageWrapper">
    <div class="imageDetails">
    <img src="cars/car_1jpg" alt="">
    <dl>
    <dt>Price</dt>
    <dd>&pound;8500</dd>
    <dt>Year</dt>
    <dd>2009</dd>
    </dl>
    <h3>Description</h3>
    <p>This is a description about the car</p> 
    </div>
    <!-- end imageDetails -->
    <div class="imageDetails">
    <img src="cars/car_1jpg" alt="">
    <dl>
    <dt>Price</dt>
    <dd>&pound;8500</dd>
    <dt>Year</dt>
    <dd>2009</dd>
    </dl>
    <h3>Description</h3>
    <p>This is a description about the car</p>
    </div>
    <!-- end imageDetails -->
    <div class="imageDetails">
    <img src="cars/car_1jpg" alt="">
    <dl>
    <dt>Price</dt>
    <dd>&pound;8500</dd>
    <dt>Year</dt>
    <dd>2009</dd>
    </dl>
    <h3>Description</h3>
    <p>This is a description about the car. This is a description about the car. This is a description about the car.</p> 
    </div>
    <!-- end imageDetails -->
    <div class="imageDetails">
    <img src="cars/car_1jpg" alt="">
    <dl>
    <dt>Price</dt>
    <dd>&pound;8500</dd>
    <dt>Year</dt>
    <dd>2009</dd>
    </dl>
    <h3>Description</h3>
    <p>This is a description about the car</p>
    </div>
    <!-- end imageDetails -->
    <div class="imageDetails">
    <img src="cars/car_1jpg" alt="">
    <dl>
    <dt>Price</dt>
    <dd>&pound;8500</dd>
    <dt>Year</dt>
    <dd>2009</dd>
    </dl>
    <h3>Description</h3>
    <p>This is a description about the car</p> 
    </div>
    <!-- end imageDetails -->
    </div>
    </body>
    </html>

  • Creating a new connection when creating a report from scratch

    I've searched all around but I haven't managed to find any samples or forum posts that show how to create a connection when creating a report from scratch via RCAPI.  All of the code that I've found has been aimed at replacing the ConnectionInfo for an existing connection.  I figured that it would work something like this:
    m_crystalReport.setReportAppServer(ReportClientDocument.inprocConnectionString);
    m_crystalReport.newDocument();
    IConnectionInfo ci = new ConnectionInfo();
    PropertyBag propertyBag = new PropertyBag();
    propertyBag.put("Use JDBC", true);
    propertyBag.put("Connection URL", "jdbc:jtds:sqlserver://localhost:1433;databaseName=" + DB_NAME);
    propertyBag.put("Database Class Name", "net.sourceforge.jtds.jdbc.Driver");
    propertyBag.put("Database DLL", "crdb_jdbc.dll");
    ci.setAttributes(propertyBag);
    m_connection = new Connection();
    m_connection.setConnectionInfo(ci);
    m_connection.open();
    but this produces a NullPointerException within Connection.open().  If I leave the connection closed but add it to the report via DatabaseController.addConnection() then I just get the exception later on when I try to add tables using the connection.
    Can anyone give me any pointers please?
    Thanks,
    Rich.

    Just in case anyone else runs into this, I managed to fix it by leaving the connection closed and then using the connection info instead of the connection when creating tables, eg:
         ITable t = new Table();
         t.setAlias(v.getAlias());
         t.setName(v.getView().getName());
         t.setConnectionInfo(m_connectionInfo);
         getDatabaseController().addTable(t, null);

  • Create a report from scratch, add Table and Datasource Problem

    Hi,
    I'm using the latest Crystal Reports Runtime supplied for eclipse.
    I want to create a report from scratch, add a Table and then add a ArrayList of Pojos as the Datasource.
    But unfortunately depending on the ConnectionInfo I supply to the Table I get different errors.
    I looked through the samples and see that I have to supply properties
    like
      "Database DLL", "crdb_javabeans.dll" and ConnectionInfo.setUserName("");
         ConnectionInfo.setPassword(null)
    I looked through the forums and find different set of properties.
    Actually because I am just working with Pojos I would have thougth that something like the following
    would be sufficient:
    ReportClientDocument  doc = new ReportClientDocument();
                doc.setReportAppServer(ReportClientDocument.inprocConnectionString);
                doc.newDocument();
    Table table = new Table();
    table.setAlias("reportTable");
    table.setName("reportTable");
    doc.getDatabaseController().addTable(oTable, null);
    doc.getDatabaseController().setDataSource(myCoolection, myClass, "reportTable", "reportTable");
    So could someone tell me the right/minimum Set of  Properties to make a Table get connected to Pojos?
    Edited by: jack mann on Aug 31, 2010 3:25 PM

    With XI Release 2, you can come quite close to creating from scratch:
    http://technicalsupport.businessobjects.com/KanisaSupportSite
    /search.do?cmd=displayKC&docType=kc&externalId=5074668
    You need Service Pack 2:
    http://support.businessobjects.com/downloads
    /service_packs/crystal_reports_en.asp
    Sincerely,
    Ted Ueda

  • Create a Database from xml

    Hi,
    I'm using javaDb embedded and I trying to find the best way to create a database from a xml file.
    I managed to do this, previously with netbeans 6.9, jdk 6 and apache ddlutils.
    Unfortunately this method as proven to be not so good, and and can't get it to work with netbeans 7.
    Is there a best way to do this?? Any recommendation on this matter will be appreciated.
    Thanks in advance,
    Hugo

    s3c wrote:
    Hi,
    I'm using javaDb embedded and I trying to find the best way to create a database from a xml file.
    I managed to do this, previously with netbeans 6.9, jdk 6 and apache ddlutils.
    Unfortunately this method as proven to be not so good, and and can't get it to work with netbeans 7.
    Is there a best way to do this?? Any recommendation on this matter will be appreciated.
    Thanks in advance,
    Hugowhat does question or solution have to do with forum TOPIC Oracle RDBMS?

  • How to create a database from dfj zip file

    Hi,
    I have created a database template via DCA from PC-1 which has got oracle 9i and it has produced a file with extention dfj.
    I am trying to create a new database using this dfj file on a different pc which has oracle 10g.
    1- How can i use dfj file to create a new database?
    2- Can i use Oracle 9i templates in Oracle 10g?

    -in dbca you have the option to create the database from existing template
    -not sure if we can simply use 9i template in 10g but you may try, chances are less.

  • How to create new database from backup.

    Hi !
    i have backup of a database, i do not want to restore, i want to create new database from the backup.
    i am using oracle 11g xe.
    yours sincerely

    If the Location of the datafiles is similar to that of source database then you can consider below steps
    Create Oracle Service using oradim
    set ORACLE_SID=NEWDB
    oradim -new -sid NEWDB -intpwd passwordofthesys -startmode M
    Connect to the RMAN
    rman>rman target /
    restore spfile/pfile and control file from backup
    rman>restore spfile to pfile '_localtion of the initNEWDB.ora_' from '_location of the SPFILE Backuppiece_';
    rman>startup nomount pfile='localtion of the initNEWDB.ora';
    rman>restore controlfile from 'file location of the controlfile Backuppiece';
    rman>alter database mount;
    Catalog the RMAN backuppiece of source database
    rman>catalog backuppiece '_location of the rman backuppiece of source database_ ';
    resotore & recover database
    rman>restore database;
    rman>recover database;
    open the database with reset logs
    rman>alter database open resetlogs;
    rman>create spfile from pfile;
    rman>shutdown immediate;
    rman>startup;
    ==================
    If you have access to source database then you can clone using below rman command:
    +rman target _<source database>_ auxiliary _<new database>_+
    rman>duplication target database to _<your new database name>_;
    ==========
    If the location of the datafiles and logfiles are different from source database then you need to add db_file_name_convert and log_file_name_convert to the pfile before starting the recovery process.

  • Create a Form from Scratch: Possible or Not

    So, I have Acrobat X.
    I want to create a form from scratch. I have Word doc, but it wasn't created to look like a form, and I didn't like the way it imported.
    So, can I create a form from scratch. Or Not?
    If you try to start from scratch, it suggests a template on formscentral - and after signing up for free and spending an hour making the form, I find that I can not save or save as PDF the form that I created without forking over my credit card information - for a free trial that bills in a few weeks. (As much as I like the form data collection tools available, I cannot have my data collected by Adobe.)
    I can open an empty MS Word doc to start from - as my import choice - but can you make it any harder to mave the text around or enter new text? I never did figure out how to edit text. Is the answer going to be to edit my text in Word or in the plain PDF tool?
    I just found the form creation to be completely counter intuitive.

    Acrobat is not a Word processor, really. "Adding a carriage return" makes sense in a word processor, where the layout is still fluid. In a PDF the layout is finished, everything is a graphic. So, absolutely, it's designed to work with pre-made forms. To me, that's a strenghth - you can use the tools you already know to make the form background, then you add the fields in Acrobat. With work, you can preserve the fields over remaking the PDF, then just adjust the field positions.

  • Create test database from standby without some data

    Hi. I want to create test database from my standby database using rman.
    But i have some some tables and where information is too large i dont want backup all data from this tables. because i dont have enough space on my test server.
    Have u any idea for solution this problem.
    Thanks

    But have suggestion.
    You can create duplicate database on based your target database (to new host) and skip undesired tablespaces...
    bash# rman target /
    RMAN> ....
    your code should be like :
    run {
    allocate auxiliary channel 'dev_0' type 'sbt_tape'
    parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=my,OB2BARLIST=MY DAILY)';
    allocate auxiliary channel 'dev_1' type 'sbt_tape'
    parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=my,OB2BARLIST=MY DAILY)';
    allocate auxiliary channel 'dev_2' type 'sbt_tape'
    parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=my,OB2BARLIST=MY DAILY)';
    allocate auxiliary channel 'dev_3' type 'sbt_tape'
    parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=my,OB2BARLIST=MY DAILY)';
    SET UNTIL SCN 7769764681915;
    DUPLICATE TARGET DATABASE TO MYTS SKIP TABLESPACE TOOLS_IDX,TOOLS,ARCHIVE,IDX;
    Edited by: Ulfet Tanriverdiyev on Dec 21, 2010 3:42 AM

  • Create a PDF from webpage using entire site option doesn't works

    OK, guys, this is the problem...
    After YEARS of testing from Acrpbat 4 thru 9 on Create a PDF from webpage using entire site option... it doesn't works properly and doesn't got the entire site. ALWAYS get an error of memory or any other error but FINALLY you NEVER got the entire site. I'm talking for a big website... not like amazon.com, but a big one.
    I make a walkarround to try to capture the website in parts but Acrobat is not "intelligent" to make a resume capture of the site, because ALWAYS start from the begining instead from the resume position of the site...
    My question is, HOW can get the ENTIRE SITE in a PDF document... without getting errors or stopping the capture process...
    Don't have problem of low RAM memory because I'm in a MONSTER MACINTOSH.... 3.2 GHZ with 8 Core and 32 GB of RAM under Mac OS X Leopard 10.5.6 in Acrobat 9 Pro.
    If I'm not wrong, the GET ENTIRE SITE option in Web Capture (Create a PDF from webpage using entire site option) doesn't works from Acrobat 4 thru 9 in Pro version... tested, you'll never got the entire site... I'm talking in capture a huge entire site and not a little one...
    Can someone help me?
    Thanks.

    Ok so I go to a web page and select something to print. Once I've clicked print I switch over from printer/micosoft xps docu writer/fax and select Adobe PDF. All goes through with a 'Create Adobe PDF' coming up progressing through to eventually save and store. Once I open the file it end up as the picture above. I have the same version on another computer and that works fine but this particular Sony laptop it doesn't seem to work properly. 

  • How to create chord charts from midi using logic pro x

    How to create chord charts from midi using logic pro x

    Depending on what you mean by Chord charts (Tabs?)
    Use the Score.......
    http://help.apple.com/logicpro/mac/10/#lgcpf755d649

  • BUG:  Advanced Actions duplicated when creating NEW PROJECTS FROM TEMPLATE using Adobe Captivate 8.

    Need:  CREATE NEW PROJECTS FROM TEMPLATE using Adobe Captivate 8. 
    Problem:  NEW PROJECT (.cptx) duplicates the Advanced Actions originally configured within TEMPLATE FILE (.cpt.).
    For example: Template file (.cptl) advanced action "_initializeModule" gets duplicated as "_initializeModule1", "_initializeModule2", "_initializeModule3" within NEW PROJECT.  FYI, the original "_initializeModule" advanced action still appears.
    MAJOR BUG, what the heck is going on?!?!!!  Planning to deploy this template file to use for multiple courses with multiple users, this WILL cause epic confusion across the board.

    Similar problem, think they are working on it as well: when dragging a shared action from an external library to a slide or object event, and that action is using a parameter that was already created for another shared action, there will be a new parameter created which really screws up the shared action contrary to this problem. Tip: for the moment do not drag shared actions from an external library immediately to an event, but drag them first to the Library: Reuse Shared Actions in other Projects - Captivate 7 vs. 8 - Captivate blog

  • Hi, I would like to create a database from my numbers spreadsheet and create reports (like SQL). Is there a way?

    Hi, I would like to create a database from my numbers spreadsheet and create reports (like SQL). Is there a way?

    Numbers is a lightweight spreadsheet.  If you know sql you will know that it can handle many queries and is a real databases that can handle many thousands of records.  Number is not the correct tool.  You can make something that does something like a query but it is not truly a query.
    Can you share anything about the specific application and how much information there is in each record?  How many records (rows)?

  • How can I create a database from a sharepoint using entity framework

    Hello All,
    I want to develop a data base from SharePoint list independently. The column name are based on a SharePoint list eg: Contact-list (will be having 10 columns)
    can any one please suggest me an idea on how to do this task? Which Visual Studio template is suitable for this purpose?
    I confused with starting with following Visual studio template!!!
    Empty SharePoint Project??, Business Data Connectivity Model??, ASP.Net Web application??
    Somebody please help me soon....
    I am using SharePoint 2010 and Visual Studio 2010

    Hey,
    basically you should start with an empty SharePoint 2010 project where you add an List-EventReceiver. This Receiver should point to the url of the list and handle the ItemAdded-Event. In this method you place the code to create the database, for example
    with a SQL-Statement.

Maybe you are looking for

  • After installing iOS7 to my iphone 4, I can no longer skip to the next song using BTA in my Honda Civic.

    Says it all. I upgraded to IOS7 and now my iphone, which has always been able to skip to the next song using wireless bluetooth. I can't use it on my steering wheel or the controls above the heating/cooling/CD drive. Nothing. I have to unlock my ipho

  • How to uninstall OS X Yosimate an them install OS X Maverick

    How to uninstall OS X Yosemite an them install OS X Maverick

  • [Announce] WSRP 1.0 Primer available for public review

    A public draft of WSRP 1.0 Primer is now available for review and comments. This document may help those trying to figure out the nuts and bolts of WSRP. If you have any comments, please post at the link below. Subbu A public review period for the WS

  • RFC-XI-SOAP scenario

    Hi friends, I m doing a RFC-XI-SOAP scenario. I m getting an error when tried to run this. soap fault: Server was unable to read request. ---> There is an error in XML document (1, 297). ---> Input string was not in a correct format. Is this because

  • Macbook & Palm PDAs

    I want to pose a theory and see if any think this is possible or just coincidental. I have twice had trouble with my built-in iSight in my MacBook (a week 26, no RSD or fan problems at all). Now with my camera working again, the only thing I'm doing