Reading from a database
Moderator: General Moderators
Re: Reading from a database
Well, take that last error for example. Surely you could have figured that out? It's saying that the column doesn't exist...
And the one about mysql_fetch_array() not having a valid resource handler...that means that mysql_query() isn't returning a resource handler, so it's probably returning false (you can check with var_dump()). That means your query is failing, so you should debug that.
Just stuff like that. I'm not trying to be mean; I'm just trying to show you how you should go about errors, saving yourself time posting here. Don't get me wrong, I have no problem helping you, otherwise I wouldn't do it, but I't'll be better for you in the long run...
And the one about mysql_fetch_array() not having a valid resource handler...that means that mysql_query() isn't returning a resource handler, so it's probably returning false (you can check with var_dump()). That means your query is failing, so you should debug that.
Just stuff like that. I'm not trying to be mean; I'm just trying to show you how you should go about errors, saving yourself time posting here. Don't get me wrong, I have no problem helping you, otherwise I wouldn't do it, but I't'll be better for you in the long run...
Re: Reading from a database
thanks for the advice (not sarcastic
) but for things like the last one fair enough but i dont really know any php and aren't able to understand errors etc 
is there a site which lists such errors etc ?
is there a site which lists such errors etc ?
Re: Reading from a database
Not that I know of...
But tbh, I think PHP and MySQL errors are actually rather generous, as in they're pretty self explanatory.
If you read the error, and think about what it says and what could be causing it, you can usually figure out what's wrong.
They usually give you line references as well, so you know exactly what line is causing the problem. That's possibly the most useful thing ever - especially when you've got scripts several thousand lines long.
But tbh, I think PHP and MySQL errors are actually rather generous, as in they're pretty self explanatory.
If you read the error, and think about what it says and what could be causing it, you can usually figure out what's wrong.
They usually give you line references as well, so you know exactly what line is causing the problem. That's possibly the most useful thing ever - especially when you've got scripts several thousand lines long.
Re: Reading from a database
cool, thanks again
how did / do you learn so much web script then ? I'm only 15 and want to become a webdesigner or something like that. any tips? 
Re: Reading from a database
Well, I'm only 16, so.... 
Pretty cool tbh, because most of the people on forums such as this are like 30, and "professional" web developers, and I'm teaching them stuff...
Idk, I knew a bit of C beforehand, and the two languages are very similiar. To be perfectly honest, I've probably learnt most of what I know from helping people on forums like this.
If someone has a problem that I don't understand, I'll go and research it until i find a solution. In the process I'll probably teach myself something new as well, which I'll update or implement in my own code.
Oh, and read the manual. Seriously.
Pretty cool tbh, because most of the people on forums such as this are like 30, and "professional" web developers, and I'm teaching them stuff...
Idk, I knew a bit of C beforehand, and the two languages are very similiar. To be perfectly honest, I've probably learnt most of what I know from helping people on forums like this.
If someone has a problem that I don't understand, I'll go and research it until i find a solution. In the process I'll probably teach myself something new as well, which I'll update or implement in my own code.
Oh, and read the manual. Seriously.
Re: Reading from a database
wow ! that makes sense too ! 
btw, what manual ?
btw, what manual ?
Re: Reading from a database
thank you very much, i didnt know about these 
hope to speak to you again
Adam
hope to speak to you again
Adam
Re: Reading from a database
by the way, you wouldn't know about javascript would you, is there a way of showing the error like php ?
I am trying to make a validation form
I am trying to make a validation form
Re: Reading from a database
I would call myself capable 
If you download something like firebug, or just use the firefox error console you can see errors.
If you download something like firebug, or just use the firefox error console you can see errors.