niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
· nixdoc.net · man pages · Linux HOWTOs · FreeBSD Tips · Forums
navigation Forum index » Programming » PHP
"call to undefined function" mysql_error when adding new rows to table
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
Author Message
news@smutchin.co.uk
*nix forums beginner


Joined: 14 Jul 2006
Posts: 2

PostPosted: Fri Jul 14, 2006 4:15 pm    Post subject: "call to undefined function" mysql_error when adding new rows to table Reply with quote

Hi all, hope you can help me.

I have recently set up a mysql database of local pubs, with a web form
to add new listings (using PHP to generate an INSERT query).

I've just been doing a bit of data entry, adding a bunch of new pubs,
and all was going swimmingly. But suddenly it has stopped working - now
when I try to add a new pub I get an error message "call to undefined
function". I have not altered the script in any way since the last
successful addition was made.

I ran a SELECT * query on the pubs table to proofread the entries, but
couldn't spot any glaring errors. Then I ran a SELECT COUNT(*) on the
table. The result was 100, ie there were rows numbered 0-99.

I'm wondering if there could be a problem with handling three-figure
row numbers. It sounds highly unlikely (I've checked the documentation
so I know the table [MyISAM] is supposed to be able to handle many more
rows than that).

Maybe it's a restriction imposed by my webhost? (Supanames.co.uk) This
also sounds unlikely.

But in any case, I'm completely baffled. Can anyone suggest any
possibilities?

(Btw, I don't know which version of PHP Supanames has installed.)

cheers,

David
Back to top
Jerry Stuckle
*nix forums Guru


Joined: 24 Feb 2005
Posts: 1515

PostPosted: Sat Jul 15, 2006 3:21 am    Post subject: Re: "call to undefined function" mysql_error when adding new rows to table Reply with quote

news@smutchin.co.uk wrote:
Quote:
Hi all, hope you can help me.

I have recently set up a mysql database of local pubs, with a web form
to add new listings (using PHP to generate an INSERT query).

I've just been doing a bit of data entry, adding a bunch of new pubs,
and all was going swimmingly. But suddenly it has stopped working - now
when I try to add a new pub I get an error message "call to undefined
function". I have not altered the script in any way since the last
successful addition was made.


What function is undefined?

Quote:
I ran a SELECT * query on the pubs table to proofread the entries, but
couldn't spot any glaring errors. Then I ran a SELECT COUNT(*) on the
table. The result was 100, ie there were rows numbered 0-99.

I'm wondering if there could be a problem with handling three-figure
row numbers. It sounds highly unlikely (I've checked the documentation
so I know the table [MyISAM] is supposed to be able to handle many more
rows than that).


Shouldn't be any PHP problem. If you suspect a MySQL problem try
comp.databases.mysql.

Quote:
Maybe it's a restriction imposed by my webhost? (Supanames.co.uk) This
also sounds unlikely.


Did you ask them?

Quote:
But in any case, I'm completely baffled. Can anyone suggest any
possibilities?


Sorry, my crystal ball is in the shop and you didn't give enough
information to even know where to start!

Quote:
(Btw, I don't know which version of PHP Supanames has installed.)


Did you try phpinfo()?

Quote:
cheers,

David



--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Back to top
news@smutchin.co.uk
*nix forums beginner


Joined: 14 Jul 2006
Posts: 2

PostPosted: Sat Jul 15, 2006 7:41 am    Post subject: Re: "call to undefined function" mysql_error when adding new rows to table Reply with quote

Jerry Stuckle wrote:
Quote:
What function is undefined?

"mysqlerror()" [sic]

I hadn't noticed the typo before because the mysql_query it related to
hadn't previously returned a 'false' value... And it turns out the
reason for the 'false' value was because the primary field in the table
was a TINYINT and it was trying to enter a value higher than 127...
doh!

Apologies for wasting your time/bandwidth.

Quote:
(Btw, I don't know which version of PHP Supanames has installed.)


Did you try phpinfo()?

No, didn't occur to me. Thanks for reminding me of that option!

David
Back to top
Jerry Stuckle
*nix forums Guru


Joined: 24 Feb 2005
Posts: 1515

PostPosted: Sat Jul 15, 2006 11:52 am    Post subject: Re: "call to undefined function" mysql_error when adding new rows to table Reply with quote

davek wrote:
Quote:
Jerry Stuckle wrote:

What function is undefined?


"mysqlerror()" [sic]

I hadn't noticed the typo before because the mysql_query it related to
hadn't previously returned a 'false' value... And it turns out the
reason for the 'false' value was because the primary field in the table
was a TINYINT and it was trying to enter a value higher than 127...
doh!

Apologies for wasting your time/bandwidth.


No problem - been there, done that, got the T-Shirt (multiple, in fact
Smile ).

Quote:

(Btw, I don't know which version of PHP Supanames has installed.)


Did you try phpinfo()?


Always a good thing to remember!

Quote:

No, didn't occur to me. Thanks for reminding me of that option!

David




--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
The time now is Thu Sep 09, 2010 11:51 am | All times are GMT
navigation Forum index » Programming » PHP
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Function Pointer Sikandar C 3 Fri Jul 21, 2006 1:23 pm
No new posts How to ALTER a table using the ALTOBJ procedure Serge Rielau IBM DB2 1 Fri Jul 21, 2006 1:06 pm
No new posts Arbitrary function with parameter darknails@gmail.com C++ 2 Fri Jul 21, 2006 9:58 am
No new posts Is there C/C++ corresponding function in Linux for Java's... xiebopublic@gmail.com apps 4 Fri Jul 21, 2006 3:22 am
No new posts Can't Select External Table from CSV File Resant Server 1 Fri Jul 21, 2006 2:45 am

Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum |  email marketing service
 
Sponsors: Debt Help | Debt Help | Free Ecards | Cheap Home Insurance | Find jobs
Privacy Policy
[ Time: 0.0910s ][ Queries: 17 (0.0584s) ][ GZIP on - Debug on ]