Trying to read and write from a table

10-21-08, 12:47 PM
|
|
Newbie Coder
|
|
Join Date: Oct 2008
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
Trying to read and write from a table
Hi,
im trying to write a code which writes and reads a string in a field of a table, but i get this error below at the line that starts with "$row = mysql_fet..."
This is the code:
Anyone can help me?
Ciao
|

10-21-08, 12:59 PM
|
 |
Community Leader
|
|
Join Date: Sep 2005
Location: Spain
Posts: 8,074
Thanks: 11
Thanked 88 Times in 83 Posts
|
|
mysql_db_query() was deprecated a long... very long time ago.
Use mysql_query() and mysql_select_db() instead.
www.php.net/mysql_select_db
www.php.net/mysql_query
|

10-22-08, 04:59 PM
|
|
Newbie Coder
|
|
Join Date: Oct 2008
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks Nico,
your code gives this error:
|

10-22-08, 05:01 PM
|
|
Wannabe Coder
|
|
Join Date: Jul 2008
Location: Somerset UK!
Posts: 192
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
That is because there is no connection to the database.
|

10-22-08, 05:32 PM
|
|
Wannabe Coder
|
|
Join Date: Jun 2008
Posts: 116
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by ianbrind
That is because there is no connection to the database.
|
I believe there is he has just taken out the username and password so we cannot see
|

10-23-08, 10:23 AM
|
|
Newbie Coder
|
|
Join Date: Oct 2008
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by ianbrind
That is because there is no connection to the database.
|
!?!...but, if i can't see the error message about the connection, why do you say that??
|

10-23-08, 11:15 AM
|
 |
Community Liaison
|
|
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 3,454
Thanks: 0
Thanked 140 Times in 137 Posts
|
|
Nico's code works fine if you have
a database named "ejemplo"
with a table named "clientes"
that has a column named "nombre".
__________________
Jerry Broughton
|

10-25-08, 04:26 PM
|
|
Newbie Coder
|
|
Join Date: Oct 2008
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by job0107
Nico's code works fine if you have
a database named "ejemplo"
with a table named "clientes"
that has a column named "nombre".
|
Hi,
thanks, i think your are wrong, don't you? :
|

10-26-08, 08:36 PM
|
 |
Community Liaison
|
|
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 3,454
Thanks: 0
Thanked 140 Times in 137 Posts
|
|
Quote:
Originally Posted by tirengarfio
Hi,
thanks, i think your are wrong, don't you? :
|
No, I am not wrong and neither is Nico.
You are doing something wrong some where.
__________________
Jerry Broughton
|

10-27-08, 04:46 AM
|
|
Newbie Coder
|
|
Join Date: Oct 2008
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by job0107
You are doing something wrong some where.
|
Ok job0107, but... with the information i have posted (tables and code), is not enough to know Where is the error?
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|