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

No return using PEAR and MySQL

Hi all.

Below is the php code (Very simple):

<?php
include_once('C:\AppServ\php\PEAR\DB.php');
$db = DB::connect("mysql://alucard@localhost:3306/soccer");
$db->setErrorHandling(PEAR_ERROR_DIE);

if (DB::isError($db)) {
print $db->getMessage();
exit;
} else {
$result = $db->query("SELECT * FROM league;");
print 'Query returned ' . $result->numRows() . ' rows\n';
print 'Query returned ' . $result->numCols() . ' cols\n';
print 'Query affected ' . $db->affectedRows() . ' rows\n';

$db->query("INSERT INTO people VALUES ('Thomas', 0);");
print 'Query returned ' . $result->numRows() . ' rows\n';
print 'Query returned ' . $result->numCols() . ' cols\n';
print 'Query affected ' . $db->affectedRows() . ' rows\n';
$result->free();
}
$db->disconnect();
?>

Now the problem is, when I ran this code, there is nothing return in
browser.(ALL BLANK, see nothing, no error, no result, absolutely
white!!!)

There was also no changes on DB.

What happen? And can anyone please help with this issue?

Thank you very much in advance!
Jul 17 '05 #1
1 1699


Ellery Leung wrote:
$result = $db->query("SELECT * FROM league;");
$result =& $db->query('SELECT * FROM league');
Now the problem is, when I ran this code, there is nothing return in
browser.(ALL BLANK, see nothing, no error, no result, absolutely
white!!!)

There was also no changes on DB.

What happen? And can anyone please help with this issue?


If you are goint to use PEAR:DB, why not take advatnage of things
like query preparation, etc.

/M
Jul 17 '05 #2

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

Similar topics

3
by: Ron King | last post by:
When I installed Mandrake 10.0 I thought I had Apache, PHP, and MySQL installed correctly. I could serve web pages, MySQL worked, and when I tried the phpinfo() function, I got a page that looked...
3
by: Wayne Smallman | last post by:
Hi! I've had a look through various forums for some advice on getting Pear DB working with my Entropy installation of PHP Version 4.3.6 Most of the topics I found are after the fact, so that's...
4
by: petermichaux | last post by:
Hi, I have installed PHP 5.0.3 for OS X. I have read in several places that PEAR is included in recent installations of PHP. I'm having trouble getting PEAR DB working. How would I know or test...
0
by: metin | last post by:
When I want to install php after the commands ../configure --with-apxs2=/www/bin/apxs --with-mysql and make without any error, when i type make install i have the following error: Installing...
5
by: kd | last post by:
I need pear for an offline laptop so the standard install method is no possible. Any suggestions as to how to install pear on the laptop, does anyone have a zip of all pear packages that I can...
4
by: inetquestion | last post by:
php has been configured with the following two configure lines and core's during "make install" on the PEAR section. Is there something simple i'm missing? Any help would be appreciated. ...
2
by: wannabe | last post by:
This is being installed on WindowsXP home edition. I am a complete novice at working with php and have just installed apache2_2, php5, mySQL5.0 and phpMyAdmin 2.10.1. After installing all 4...
5
Atli
by: Atli | last post by:
Hi guys. So, I got it into my head this morning that I needed a Linux HTTP server. Naturally that means installing Apache with PHP and last but not least, MySQL. I decided to use Fedora Code...
2
by: Frank Peterson | last post by:
I have apache, php5 and mysql setup. I want to get PEAR installed, but the Windows2000 machine it is on, does not have internet access and I can not hook it up to the internet. So I need to...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
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: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.