Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
|
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 20th, 2006, 01:18 PM
Registered User
 
Join Date: Dec 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Database Management Problem

I am feeling problem when I post or retrieve values in/form databas. Function is made by me which is called by the form page , but values are not posted in database. No error declared by browser:-

function select()
   {
    $qry = "select * from donarinfo where pk_id=7";
    $row=mysql_query($qry);
    $result= mysql_select_db($databaseName);
    return $result;
   }


 
Old December 20th, 2006, 03:21 PM
Authorized User
 
Join Date: Oct 2006
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi try like this:

{
    $qry = "SELECT * from donarinfo
    WHERE pk_id=7";
    $result= mysql_select_db($qry)or die(mysql_error());
    $row=mysql_query($result);

    extract ($row);
   }

______________________________________
.::If you quit you loss, If you survive you win::.

.::JHANNY::.


 
Old December 22nd, 2006, 12:47 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

try with this,

$link = mysql_connect('localhost', 'user', 'pass')
    OR die(mysql_error());
 mysql_select_db("databasename",$link)or die("did not select database");
$sql="SELECT * from donarinfo WHERE pk_id=7";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
extract ($row);
}


surendran
(Anything is Possible)
http://ssuren.spaces.msn.com
 
Old January 25th, 2007, 01:09 AM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i am new

 
Old January 25th, 2007, 01:10 AM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

how to create a database in mysql through php






Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Javascript in Content Management sankar2chat .NET Framework 2.0 1 August 19th, 2008 02:14 PM
Problem to restore database in C#2005 database acmuralee MySQL 0 March 25th, 2008 04:42 AM
Database Management Problem talk2learner Beginning PHP 2 December 21st, 2006 05:54 AM
Transaction Management azmatazz Biztalk 0 April 28th, 2005 07:17 AM
oracle management server configure problem mateenmohd Oracle 1 October 13th, 2003 05:11 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.