Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Php진척사항: Difference between revisions

From ZeroWiki
imported>talin0528
No edit summary
 
imported>linflus
No edit summary
 
Line 1: Line 1:
<?php
DeleteThisPage
$link = mysql_connect('mysql5.hosting.paran.com', 'linflus', 'dkdlffls');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}else{
    echo("Connect Succesful.<br/>");
}
$db = mysql_select_db("linflus_db");
/*
$sql = "CREATE TABLE guest
    (no integer not null,
    name    char(10),
    contents    text(2000),
    password    char(4),
    status  integer,
    date    date)";
$result = mysql_query($sql);
if(!$result){
    die('Can not create table');
}else{
    echo($result);
}
*/
$sql = "INSERT INTO guest
    values(1, 'ksh', 'hello', '1234', 1)";
$result = mysql_query($sql);
$sql = "SELECT * FROM guest";
$result = mysql_query($sql);
$obj = mysql_fetch_object($result);
echo($obj->name);
?>



Latest revision as of 14:25, 5 August 2010

DeleteThisPage