I'm not exactly sure what your question is, but I'll try to help. You need
to make a connection to the MYSQL database first.

$databaseuser = "databaseuser";
$databasepassword = "databasepassword";
$serverdns = "mysqlrentals.hostedresources.com";
$databasename = "rentalsdb";

@mysql_pconnect($serverdns, $databaseuser,$databasepassword)
  or die("My very first custom error message!");
mysql_select_db($databasename);

Then you need to query the database with a query statement

<?php
session_start();

$query = "SELECT type, address, streetnumber, streetname, streetsuffix,
city, state, zip, bedrooms, bathrooms, living, dining, listPrice, sqft,
area, schooldistrict, community, securityDeposit, petDeposit, available,
applicationFee, leaseLengthInMonths, listedBy, description, directions,
schooldistrict, petPolicy, pictureDirectory, picture1, picture2, picture3,
picture4, picture5, picture6, picture7, picture8, picture9, MLSNumber,
areaDescription, url, marketedBy, marketedByEmail, marketedByTitle, notes
FROM tblRentals WHERE MLSNumber = $MLSNumber";
$result = mysql_query($query);
$totalrows = mysql_num_rows($result);

$rowID= 0;
 $type = mysql_result($result, $rowID, "type");
 $address = mysql_result($result, $rowID, "address");
  $streetnumber = mysql_result($result, $rowID, "streetnumber");
  $streetname = mysql_result($result, $rowID, "streetname");
    $streetsuffix = mysql_result($result, $rowID, "streetsuffix");
   $fulladdress = "$streetnumber $streetname $streetsuffix";

This allows you to access the data field by field. You can then use an
UPDATE query.

$query = "UPDATE tblRentals SET type='$type', MLSNumber='$MLSNumber',
streetnumber='$streetnumber',
streetname='$streetname', streetsuffix='$streetsuffix', city='$city',
state='$state', zip='$zip',
bedrooms='$bedrooms',
bathrooms='$bathrooms', listPrice='$listPrice', sqft='$sqft', area='$area',
schooldistrict='$schoolDistrict', community='$community',
securityDeposit='$securityDeposit',
available='$available', pictureDirectory='$pictureDirectory',
picture1='$picture1', picture2='$picture2', picture3='$picture3',
picture4='$picture4',
picture5='$picture5', picture6='$picture6', picture7='$picture7',
picture8='$picture8',
picture9='$picture9', notes='$notes' WHERE MLSNumber='$currentMLSNumber'";

Grant
On Fri, Mar 19, 2010 at 6:41 AM, Satyajeet Khare
<[email protected]>wrote:

>
>
> Hi!
>
> I am new to database management. I have tried to create an online database
> using MySQL, PHP which can be found at
>
> http://huhida.zxq.net/
>
> I am calling entries from MySQL table to .php file in table format. I want
> to merge cells with same content. I am not good at programming and therefore
> cant find the solution. Anybody can help?
>
> Satyajeet Khare,
> Senior Research Fellow,
> Gupta Lab, ACTREC, India
>
> --- On Fri, 3/19/10, webmaster_bmw 
> <[email protected]<greg.smith%40uksites4all.co.uk>>
> wrote:
>
> From: webmaster_bmw 
> <[email protected]<greg.smith%40uksites4all.co.uk>
> >
> Subject: [php_mysql] Has this group died?
> To: [email protected] <php_mysql%40yahoogroups.com>
> Date: Friday, March 19, 2010, 4:51 PM
>
>
>
>
> No posts since October 2009....
>
> Anyone out there?
>
> [Non-text portions of this message have been removed]
>
>  
>



-- 
Grant S. Pollet, REALTOR
Austin TX


[Non-text portions of this message have been removed]



------------------------------------

The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning. Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/php_mysql/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to