Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

hi, ich versuche eine Datenbank und eine Tabelle in der erzeugten Datenbank zu erstellen... aber irgendwie klappt es nciht so wie ich will. Die DB erstellt das script auch richtig, nur leider nicht die Tabelle.

<?
include "config.inc.php";
$query1="CREATE DATABASE $db;";

$connect=@mysql_connect($host, $user, $password) OR die(mysql_error());
@mysql_connect($host, $user, $password) OR die(mysql_error());

mysql_query ($query1, $connect);




mysql_query ("CREATE TABLE `laptopverleih` (
`ID` int(11) NOT NULL auto_increment,
`zeit` int(11) NOT NULL,
`vorname` char(40) collate latin1_general_ci NOT NULL,
`name` char(40) collate latin1_general_ci NOT NULL,
`datumvon` char(20) collate latin1_general_ci NOT NULL,
`datumbis` char(20) collate latin1_general_ci NOT NULL,
`statement` longtext collate latin1_general_ci NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=57 ");

?>
[/PHP]

rechte hab ich und fehlermeldungen sind keine da...

Nachdem du die Datenbank angelegt hast must du diese erst auswählen, sonst weiß der ja nicht, in welcher Datenbank du die Tabelle erstellen willst

Das hier sollte dir weiterhelfen:

mysql_select_db($db, $connect);

Alternativ kannst du auch die DB in jedem SQL-Statement mit angeben:


..."CREATE TABLE $db.`laptopverleih`...

ok, danke! ;)

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.