Re: [PHP] Programming question - New to PHP

2006-07-02 Thread Russbucket
On Wednesday 28 June 2006 19:55, Chris wrote:
 Russbucket wrote:
  I took an example  of a script from the PHP documentation and try to
  connect to my database.   If I leave in the or die part of line 3, I get
  nothing, if I comment out that part I get the echo message on line 4.
 
  ?php
  // Connecting and selecting the database
  $conn = mysql_connect ('localhost', 'finemanruss', 'XXXl') or die
  ('Could not connect :  '  . mysql_error());
  echo 'Connected successfully';
  mysql_select_db (Lions, $conn);
 
  // Preform SQL query
  $query = 'SELECT * FROM Moses_Lake_Lions';
  $result = mysql_query ($query) or die ( 'Query failed;   '  .
  mysql_error()); ?
 
  I know line three works without the or die part since I have a 2nd script
  that is almost the same (no or die) and it retrieves info from my DB.

 Try it the same as the php manual page:

 $conn = mysql_connect('');
 if (!$conn) {
die(Could not connect:  . mysql_error());
 }

 --
 Postgresql  php tutorials
 http://www.designmagick.com/
Chris thanks for the response. I got this working and solved a couple other 
issues. Now just have one I'm working on where thedata is not being sorted 
correctly. I will be looking at that tommorrow. 

Thanks again for the response.
-- 
Russ

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Programming question - New to PHP

2006-06-29 Thread Russbucket
On Thursday 29 June 2006 06:29, Jeremy Schreckhise wrote:
snip
 Try
   $link = mysql_connect('localhost',$youruser,$yourpassword) or die();
   mysql_select_db('yourdb');

   $query = 'SELECT * FROM Moses_Lake_Lions';
   if(!$result = mysql_query ($query,$link))
   {
   // do error checking here
   }

 Jeremy Schreckhise, M.B.A.

 -Original Message-
 From: Russbucket [mailto:[EMAIL PROTECTED]
Thanks I'll try that.
-- 
Russ

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Programming question - New to PHP

2006-06-28 Thread Russbucket
I took an example  of a script from the PHP documentation and try to connect 
to my database.   If I leave in the or die part of line 3, I get nothing, if 
I comment out that part I get the echo message on line 4. 

?php
// Connecting and selecting the database
$conn = mysql_connect ('localhost', 'finemanruss', 'XXXl') or die ('Could 
not connect :  '  . mysql_error());
echo 'Connected successfully';
mysql_select_db (Lions, $conn);

// Preform SQL query
$query = 'SELECT * FROM Moses_Lake_Lions';
$result = mysql_query ($query) or die ( 'Query failed;   '  . mysql_error());
?

I know line three works without the or die part since I have a 2nd script that 
is almost the same (no or die) and it retrieves info from my DB.

Can anyone point me to some tips or solutions to the or die problem? This 
script is located in the mysql ref section of the php manual. I'm using php5 
on SUSE Linux 10.0 with a mysql database.

Thanks in advance.
-- 
Russ

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP Install problem

2005-11-14 Thread russbucket
Trying to get apache2, php5 and mysql running. get the following error when 
opening phpMyAdmin. Can someone explain what it means. There is an include 
path in php.ini.


-- 
Russ

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Install problem

2005-11-14 Thread russbucket
On Monday 14 November 2005 10:47, Curt Zirzow wrote:
 On Mon, Nov 14, 2005 at 10:06:17AM -0800, russbucket wrote:
  Trying to get apache2, php5 and mysql running. get the following error
  when opening phpMyAdmin. Can someone explain what it means. There is an
  include path in php.ini.

 I think you forgot to include the error message.

 curt.
 --
Your right, hand got ahead of my brain,  Heres the messages when using 
http/localhost/phpMyAdmin/ 

phpMyAdmin - Error
 phpMyAdmin was unable to read your configuration file!
This might happen if PHP finds a parse error in it or PHP cannot find the 
file.
Please call the configuration file directly using the link below and read the 
PHP error message(s) that you receive. In most cases a quote or a semicolon 
is missing somewhere.
If you receive a blank page, everything is fine.

 config.inc.php

Clicking on the config.inc.php gives following error.
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 
0
 
 Warning: Unknown: Failed opening '/srv/www/htdocs/phpMyAdmin/config.inc.php' 
for inclusion (include_path='.:') in Unknown on line 0

I've checked and rechecked the configurations files, they look correct.

Thanks for responding even with my goof.

-- 
Russ

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php