473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

"call to undefined function" mysql_error when adding new rows to table

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

Jul 14 '06 #1
3 2453
ne**@smutchin.co.uk wrote:
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?
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.
Maybe it's a restriction imposed by my webhost? (Supanames.co.uk) This
also sounds unlikely.
Did you ask them?
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!
(Btw, I don't know which version of PHP Supanames has installed.)
Did you try phpinfo()?
cheers,

David

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 15 '06 #2
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.
(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

Jul 15 '06 #3
davek wrote:
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
:-) ).
>
>>>(Btw, I don't know which version of PHP Supanames has installed.)

Did you try phpinfo()?
Always a good thing to remember!
>
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.
js*******@attglobal.net
==================
Jul 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Don Vaillancourt | last post by:
What's going on with Javascript. At the beginning there was the "undefined" value which represented an object which really didn't exist then came the null keyword. But yesterday I stumbled...
2
by: David Bradbury | last post by:
I currently have an iframe on a webpage into which users can insert content. They can further customise the text as I've included buttons such as Bold, Italic, Bullet point etc. This is done along...
1
by: Chris | last post by:
How do I stop displaying "undefined" when using the code below. The problem occurs as I want to display 5 items per page using setInterval but this causes 'mycars' to reach a value that doesn't...
49
by: matty | last post by:
Hi, I recently got very confused (well that's my life) about the "undefined" value. I looked in the FAQ and didn't see anything about it. On...
3
by: dumbledad | last post by:
Hi All, I know this comes up lots but I have tried the previously posted solutions and they are not working for me. I have a new installation of MySQL and PHP running on Windows Server 2003 SP2...
9
by: Klaus Johannes Rusch | last post by:
IE7 returns "unknown" instead of "undefined" when querying the type of an unknown property of an object, for example document.write(typeof window.missingproperty); Has "unknown" been defined...
5
by: Jason | last post by:
Hello, I am trying to dynamically create a table, then set its <td>'s onclick: var table = document.createElement("table"); var row = table.insertRow(-1); var td = row.insertCell(-1);...
4
by: chuaby | last post by:
Hi May i know is it possible to run a function when we pass in the function name as parameter ? eg retval = functionA(A) but i would like to have something like : varFun = functionA(A)
6
by: SuperFool | last post by:
This has got to be one of those questions only a serious newbie would come up with.... Basicly: I select all the city names in the table and turn them into a pull down menu (code below) print...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.