|
CREATE TABLE `test` ( `id` VARCHAR( 10 ) NOT NULL , `num` INT NOT NULL )
insert into test(id,num) values('abc',1);
<?PHP
mysql_connect("localhost","user","password");
mysql_select_db("test");
$query="select * from test where id = 'abc'";
$rows = mysql_query($query);
$row = mysql_fetch_array($rows);
print_r($row);
echo "<br>";
echo $row['id'];
?> |
|