Help - Search - Members - Calendar
Full Version: Is It Just Me, Or....
Zymic Webmaster Forums > Zymic Free Web Hosting > Databases & MySQL
MrFish
Is it really hard to get into the phpmyadmin? It takes 10 minutes to load for me and sometimes doesn't even load.
Braunson
Possibly many people on the server, what server might you be on?
MrFish
The free webhosting server? I'm not sure if that was one server or a makeup of several.

Edit: uuuq.com server? Does that sound right?
Braunson
Yes that sounds right.. Seems fast now but there has been some trouble with it, try again in a bit, and if this problem persists, I'm sure one of the Mods will step in!
MrFish
It's still taking incredibly long. I'm going to try another server.

Edit:
Nevermind, I can't try another server because of this server move. Can a mod tell me if it's possible to use commands like CREATE TABLE and CREATE DATABASE in php on zymic? If it is possible then I don't even need phpmyadmin.
Braunson
QUOTE(MrFish @ Jun 13 2009, 04:42 AM) *
It's still taking incredibly long. I'm going to try another server.

Edit:
Nevermind, I can't try another server because of this server move. Can a mod tell me if it's possible to use commands like CREATE TABLE and CREATE DATABASE in php on zymic? If it is possible then I don't even need phpmyadmin.


Yes you can create a table and a database via php.. Using this code..

SQL
CREATE TABLE inventory
(
id INT IDENTITY(1,1) PRIMARY KEY,
product VARCHAR(50) UNIQUE,
quantity INT,
price DECIMAL(18,2)
)

SQL
CREATE DATABASE MyDatabase


And you would use it like so:
CODE
<?php

/* Creating a table */
$sql_tbl = "CREATE TABLE inventory
(
   id INT IDENTITY(1,1) PRIMARY KEY,
   product VARCHAR(50) UNIQUE,
   quantity INT,
   price DECIMAL(18,2)
)";

$query_tbl = mysql_query($sql_tbl)or mysql_error();


/* Creating a database */
$sql_db = "CREATE DATABASE MyDatabase";
$query_db = mysql_query($sql_db)or mysql_error();

?>


WCSchools is your friend! http://www.w3schools.com/php/php_mysql_create.asp!! smile.gif
MrFish
I don't understand, I did this. And I read through all the w3schools for javascript, asp, sql, php, ajax, and xml (Which I don't know why people like xml. Still seems worthless to me).

Can you please tell me why this isn't working?
CODE
<html>
<body>
<?
$con = mysql_connect('localhost', 'robocookie_1', 'frizzler');
if(!$con){
die();
echo 'Mysql did not connect: ' . mysql_error();
}
if(mysql_select_db('robocookie_udb', $con)){
echo 'Database selected <br />';
} else {
echo "Database not selected";
}
if (mysql_query("CREATE TABLE ui (id INT, username varchar(255), password varchar(255)")){
echo 'Table Created';
} else {
echo 'Table not created';
}
?>
</body>
</html>


Am I doing this wrong? Should my query be- mysql_query($variable)?

EDIT:

Well, I did that and I guess that did the trick. I don't know what the error was exactly but I'll follow that template from now on. Thanks smile.gif
Braunson
I replied to your last post for help on this code.. Try out my updated version and let me know.

http://www.zymic.com/forum/index.php?s=&am...ost&p=98114
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.