No Database selected when executing MySQL in php

后端 未结 2 720
-上瘾入骨i
-上瘾入骨i 2021-01-20 21:44

I\'m having problems with this php code which needs to create a table in the database specified by the user. But whenever I try to execute the SQL it tells me no database s

相关标签:
2条回答
  • 2021-01-20 22:04

    Use this code:

    mysql_select_db("Ebooks");//Select Database
    
    0 讨论(0)
  • 2021-01-20 22:05

    Use

    mysql_select_db( "Ebooks" ) or die( 'Error'. mysql_error() );
    
    0 讨论(0)
提交回复
热议问题