|
|
Or, use your gamerDNA username: (more...)
| ||||||
| |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
| | #1 (permalink) | |
| Banned Join Date: Nov 2003
Posts: 1,219
| Request: PHP/MySQL Help So I've been taking a break from C++ and have been delving into PHP/MySQL. I'm having the most insane problem adding information to my database. I have a database named wowqdb with a table called "simple" with only one parameter ("name"). I'm almost 90% confident that my syntax is correct, but for some reason when I get to mysqli_query() it fails .Any assistance would be appreciated. Quote:
| |
| | |
| | #2 (permalink) |
| Registered User Join Date: Sep 2002
Posts: 1,128
| I'm not too familiar with this function, as I usually use mysql_query. But a quick look on php.net tells me that you need to specify more arguments in the query. Anyway, the SQL query itself is not correct. I believe you forgot to specify the field name in the table. With a mysql_query it would look like this: Code:
__________________ - Furism Last edited by Furism : 03-29-2007 at 07:35 AM. |
| | |
| | #3 (permalink) |
| Banned Join Date: Nov 2003
Posts: 1,219
| Didn't work. =\ If you don't specify the field name I'm pretty sure it just automatically fills the table with values in order. It might have something to do with my database configuration, I'm pretty lost on setting up all of the table parameters. |
| | |
| | #8 (permalink) | |
| Banned Join Date: Nov 2003
Posts: 1,219
| Quote:
Changed it to VARCHAR and am still getting the same results. Also added it as primary key and it didn't change anything. =\ What should the collation be? It's set as utf_general_ci. | |
| | |
| | #12 (permalink) |
| Banned Join Date: Nov 2003
Posts: 1,219
| I'm not exactly sure. I installed Apache/PHP/Ruby/MySQL on my own PC using some guide I got from the internet and it told me to uncomment the mysqli portion of the php.ini. Supposedly, its supposed to be faster but a quick google shows you that it isn't the case in all situations. mysql functions don't even work for me, I have to use mysqli. Edit: PHP: MySQL Improved Extension - Manual Last edited by tikkus : 03-29-2007 at 11:34 AM. |
| | |
| | #13 (permalink) |
| Administrator Join Date: Dec 2004
Posts: 38
| After you connect to the database server, you need to select the database you wish to work with before attempting to insert into it. Code:
|
| | |
| | #14 (permalink) | |
| Registered User Join Date: Sep 2002
Posts: 54
| Quote:
MySQLi vs MySQL (benchmarks) I also believe mysqli is required to access some of the newer features in mysql 5. | |
| | |
| | #15 (permalink) | |
| Registered User Join Date: Sep 2002
Posts: 1,128
| Quote:
__________________ - Furism | |
| | |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
| |