xxrealmsxx Posted April 17, 2010 Share Posted April 17, 2010 I am receiving this error: Database Selected: Query:CREATE DATABASE test Results Fatal error: Call to undefined function myqsli_error() in C:\xampp\htdocs\mysql_send.php on line 26 For the attached file. Anyone care to give me a hand? I am very new to this. [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 17, 2010 Share Posted April 17, 2010 mysqli is spelt wrong. Line 26, change myqsli_error, to mysqli_error Quote Link to comment Share on other sites More sharing options...
xxrealmsxx Posted April 17, 2010 Author Share Posted April 17, 2010 mysqli is spelt wrong. Line 26, change myqsli_error, to mysqli_error haha so you mean all this time I wasted looking at php.ini was a spelling error? Thanks! Side question, do you have any idea why when I run SHOW DATABASES my query doesn't show any databases, but then when I run CREATE DATABASE test I get the following: Error: Can't create database 'test'; database exists? Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 17, 2010 Share Posted April 17, 2010 For the second bit.. you must already have a database called test. I'm not sure what your trying to achieve with SHOW DATABASES. I've never actually seen it like that. Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 17, 2010 Share Posted April 17, 2010 $rows = mysql_query("show databases"); while ($row = mysql_fetch_assoc($rows)) { print $row['Database']; } Quote Link to comment Share on other sites More sharing options...
xxrealmsxx Posted April 17, 2010 Author Share Posted April 17, 2010 For the second bit.. you must already have a database called test. I'm not sure what your trying to achieve with SHOW DATABASES. I've never actually seen it like that. Yeah I figured as much, thanks! $rows = mysql_query("show databases"); while ($row = mysql_fetch_assoc($rows)) { print $row['Database']; } I'm getting all this from the 3rd Edition of PHP and MYSQL for Dummies Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 17, 2010 Share Posted April 17, 2010 I'm getting all this from the 3rd Edition of PHP and MYSQL for Dummies Good stuff. You could benefit from O'Reillys PHP Programming 2nd Edition. I like it It's got some stuff I never knew, and it was only in the chapter of basics.. Quote Link to comment Share on other sites More sharing options...
xxrealmsxx Posted April 17, 2010 Author Share Posted April 17, 2010 I'm getting all this from the 3rd Edition of PHP and MYSQL for Dummies Good stuff. You could benefit from O'Reillys PHP Programming 2nd Edition. I like it It's got some stuff I never knew, and it was only in the chapter of basics.. Cool thanks for the tip! A friend of mine and I are going through this book just to get our feet wet and then will move onto more "non dummy" materials Quote Link to comment Share on other sites More sharing options...
xxrealmsxx Posted April 17, 2010 Author Share Posted April 17, 2010 Another quick question, how do I show a list of the databases I have if the command isn't SHOW DATABASES ? Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 17, 2010 Share Posted April 17, 2010 Cool thanks for the tip! A friend of mine and I are going through this book just to get our feet wet and then will move onto more "non dummy" materials I guess you could always try reading the whole of PHP.net .. that'll keep you entertained for a while. It's free too! xD - I don't think you can... that's a job for a bigger nerd. I'm still amatuer Quote Link to comment Share on other sites More sharing options...
xxrealmsxx Posted April 17, 2010 Author Share Posted April 17, 2010 Cool thanks for the tip! A friend of mine and I are going through this book just to get our feet wet and then will move onto more "non dummy" materials I guess you could always try reading the whole of PHP.net .. that'll keep you entertained for a while. It's free too! xD - I don't think you can... that's a job for a bigger nerd. I'm still amatuer Gotcha, Well I tried the command in phpMyAdmin and it does output all of the databases. I think this mysql_send.php file the book had me create is just dumb Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 17, 2010 Share Posted April 17, 2010 What does the book say? Quote Link to comment Share on other sites More sharing options...
xxrealmsxx Posted April 17, 2010 Author Share Posted April 17, 2010 What does the book say? Well I thought I re-typed it all correctly, but I downloaded this file: http://www.janetvalade.com/Programs/phpfd3/ch04/mysql_send.phps Updated the username and now SHOW DATABASES gives me this output: Database Selected: Query: SHOW DATABASES Results Database information_schema cdcol memberdirectory mysql petcatalog phpmyadmin test So I guess I mis-typed something. Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 17, 2010 Share Posted April 17, 2010 Probs. However.. don't download files again it doesn't help. I guess you can always retype it based on it. Typing is better than copying and pasting, as it gives memory to your fingers, and your reading as you go along. Thus making it stick in your head Quote Link to comment Share on other sites More sharing options...
xxrealmsxx Posted April 18, 2010 Author Share Posted April 18, 2010 Probs. However.. don't download files again it doesn't help. I guess you can always retype it based on it. Typing is better than copying and pasting, as it gives memory to your fingers, and your reading as you go along. Thus making it stick in your head Yeah I plan on re-doing it, thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.