|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Hello,
I'm completely new here and do not understand most things. I work a little with php and hope someone can help! I downloaded a 'espace membre' (in french) and set up a llogin page and a mysql database with phpmyadmin. I keep seeing this message when i try to make a new member: Column count doesn't match value count at row 1 Do you know what I do wrong? I do not understand. thanks from claire |
|
#2
|
|||
|
|||
|
could you please post your code where you are having problems at. we can't help you unless you post some code enclosed the php code button like this
[ php] [/php ] without the spaces like this below PHP Code:
__________________
Apache Expert |
|
#3
|
|||
|
|||
|
Store your query string in a variable like:
$query = "SELECT * FROM ADMINS"; Then use it to access the table: mysql_query($query); It then becomes easy to do a print $query to see what query you sent to the database engine. In your case your query has more (or less) columns than what is in the table. Cheers! Stephane |
|
#4
|
|||
|
|||
|
thank you for your reply. It is a bit too comlicated to understand yet, but i will try. now i know that the error has to do with a non-matching query-and-table. i will check my code again for that.
it must be something small that is wrong. thanx again. i might post the code later as asp-man suggested.. claire |
|
#5
|
|||
|
|||
|
Here is some code to help you...
$query = "SELECT * FROM $db_teacher WHERE id = '$id'"; if (!($result = dbQuery($query))) { printErrorMessage("$query<BR><BR>$mess_database"); } // Query the database function &dbQuery() { switch(func_num_args()) { case 1: return(@mysql_query(func_get_arg(0))); default: return(@mysql_query(func_get_arg(0), func_get_arg(1))); } } |
|
#6
|
|||
|
|||
|
Basically, you have something like this:
Code:
INSERT INTO
table
(
field1,
field2,
field3
) VALUES (
'value1',
'value2'
)
As you can see, the number of fields don't match up with the number of values. It's easy enough to tell that without needing the source code. |
|
#7
|
|||
|
|||
|
Hi all,
thank you for helping me. maybe it's just to early for me to start with php...(or maybe i am just stupid). I do not even succeed in pasting this code in properly... (I use the php button, bu if i try to past text there, it only gives the prompt) I will maybe download another user/login system from this site. so far i have succeeded to log in as a known user, but not to create new users.. I will see if the new code helps. maybe i should just delete the whole id- number thing.. but thanks for the help. I hope i can make myself usefull some day .... claire PHP Code:
*edit: please use [ php ] and [ /php ] tags for readability!* Last edited by FrankieShakes : December 6th, 2002 at 01:50 PM. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > error message php |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|