473,322 Members | 1,431 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,322 software developers and data experts.

PHP + MYSQL Problem

I'm useing PHP 4.3.9 with MYSQL5
I use odbc to connect the database that is ok
but when I execte follow program ...that will disaply "Fatal error: Call to
undefined function: mysql_exec() in C:\Program Files\Apache
Group\Apache2\htdocs\link.php on line 10"

Please .....Help me ~~~thx a lot ~~~

my program source code:

<html><body>
<?php
$link = mysql_connect('localhost', '', '');
if (!$link)
{
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
$sql="SELECT * FROM item_info";
$rs=mysql_exec($link,$sql);
if (!$rs)
{
exit("Error in SQL");
}
mysql_close($link);
?>
</body></html>

Jul 20 '05 #1
2 5850
Hey Danny,

mysql_exec() is not a function or no longer according to php.net. Try mysql_query() instead.

Danny wrote:
I'm useing PHP 4.3.9 with MYSQL5
I use odbc to connect the database that is ok
but when I execte follow program ...that will disaply "Fatal error: Call to
undefined function: mysql_exec() in C:\Program Files\Apache
Group\Apache2\htdocs\link.php on line 10"

Please .....Help me ~~~thx a lot ~~~

my program source code:

<html><body>
<?php
$link = mysql_connect('localhost', '', '');
if (!$link)
{
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
$sql="SELECT * FROM item_info";
$rs=mysql_exec($link,$sql);
if (!$rs)
{
exit("Error in SQL");
}
mysql_close($link);
?>
</body></html>

Jul 20 '05 #2
Danny wrote:
I'm useing PHP 4.3.9 with MYSQL5
I use odbc to connect the database that is ok
but when I execte follow program ...that will disaply "Fatal error: Call to
undefined function: mysql_exec() in C:\Program Files\Apache
Group\Apache2\htdocs\link.php on line 10"


I can't find a function like that from the php manual:
http://www.php.net/

Perhaps you should try to use the php manual as a reference when writing
php, to make sure you got correct function names?
Jul 20 '05 #3

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

Similar topics

0
by: JL | last post by:
Platform: Linux Red Hat RHEL 3 (and red hat 9) Installed MySQL from source. As a matter of fact, installed all LAMPS from source, and the mysql socket file was arranged in a place other than...
0
by: Lenz Grimmer | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, MySQL 4.0.14, a new version of the popular Open Source/Free Software Database, has been released. It is now available in source and binary...
3
by: Kirk Soodhalter | last post by:
Hi, This started as a phpmyadmin problem, but has somehow morphed into a mysql problem. I don't know how to fix it. I am posting the conversation from a php newsgroup since it started there. ...
0
by: Plymouth Acclaim | last post by:
Hi guys, We have a problem with Dual AMD64 Opteron/MySQL 4.0.18/Mandrake 10 for a very high volume site. We are evaluating the performance on our new server AMD64 and it seems it's slow compared...
1
by: Alex Hunsley | last post by:
I am trying to install the DBD::mysql perl module. However, it claims I need mysql.h: cpan> install DBD::mysql CPAN: Storable loaded ok Going to read /home/alex/.cpan/Metadata Database was...
1
by: smsabu2002 | last post by:
Hi, I am facing the build problem while installing the DBD-MySql perl module (ver 2.9008) using both GCC and CC compilers in HP-UX machine. For the Build using GCC, the compiler error is...
1
by: jrs_14618 | last post by:
Hello All, This post is essentially a reply a previous post/thread here on this mailing.database.myodbc group titled: MySQL 4.0, FULL-TEXT Indexing and Search Arabic Data, Unicode I was...
110
by: alf | last post by:
Hi, is it possible that due to OS crash or mysql itself crash or some e.g. SCSI failure to lose all the data stored in the table (let's say million of 1KB rows). In other words what is the worst...
39
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f...
10
by: Caffeneide | last post by:
I'm using a php script which performs three xml queries to other three servers to retrieve a set of ids and after I do a query to mysql of the kind SELECT * FROM table WHERE id IN ('set of ids');...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.