Article View: es.comp.os.linux.programacion
Article #793Re: MySQL
From: Jos� Luis P�rez Diez
Date: Fri, 29 Sep 2006 09:13
Date: Fri, 29 Sep 2006 09:13
28 lines
1903 bytes
1903 bytes
In article <mn.e5747d69da153f32.59400@gmail.com>, Pointbreakers wrote:
> Fatal error: Call to undefined function: mysql_create_db() in
> /var/www/prueba.php on line 6
>
Revisa la instalacion, configuracion y lee la documentacion de php
de /usr/share/doc/php-doc/html/function.mysql-create-db.html
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
$sql = 'CREATE DATABASE my_db';
if (mysql_query($sql, $link)) {
echo "Database my_db created successfully\n";
} else {
echo 'Error creating database: ' . mysql_error() . "\n";
}
?>
--
Los programadores esta ocupados intendtado mejorar los programas a
prueba de idiotas. Mientras tanto el universo intenta mejorar los
idiotas. El universo va ganando
Technical Details
Message-ID:
<VA.00000b2e.0591757b@agujero-negro.escomposlinux.org>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!news.antakira.com!cagarruta.escomposlinux.org!hercules.escomposlinux.org!escomposlinux.org!not-for-mailReferences:
<mn.e5747d69da153f32.59400@gmail.com>Show Full Headers
Complete Article Headers
X-Google-Thread: f86c8,ba66be53c23e6229 X-Google-Attributes: gidf86c8,public X-Google-Language: SPANISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!news.antakira.com!cagarruta.escomposlinux.org!hercules.escomposlinux.org!escomposlinux.org!not-for-mail From: Jos� Luis P�rez Diez <jluis@agujero-negro.escomposlinux.org> Newsgroups: es.comp.os.linux.programacion Subject: Re: MySQL Date: Fri, 29 Sep 2006 11:13:20 +0200 Organization: JPD Co Lines: 29 Message-ID: <VA.00000b2e.0591757b@agujero-negro.escomposlinux.org> References: <mn.e5747d69da153f32.59400@gmail.com> Reply-To: jluis@agujero-negro.escomposlinux.org NNTP-Posting-Host: 83.247.136.72 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: hercules.cohp1 1159521407 24663 83.247.136.72 (29 Sep 2006 09:16:47 GMT) X-Complaints-To: newsmaster@news-17.escomposlinux.org NNTP-Posting-Date: Fri, 29 Sep 2006 09:16:47 +0000 (UTC) X-Newsreader: Virtual Access by Atlantic Coast PLC, http://www.atlantic-coast.com/va