Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

whats wrong with my update statement. I can not see it.

Status
Not open for further replies.

csphard

Programmer
Apr 5, 2002
194
US
$sql = "update tbl_listings
set address = '" . $strAddress . "',city = '" . $strCity . "',tg = '" . strTg . "',beds = '" . $strBeds . "',baths = '" . $strBaths . "',terms = '" . $strTerms . "',sqft = '"
. $strSqft "', lot = '" . $strLot . "',price = '" . $strPrice . "',status = '" . $strStatus . "' where l_id ='" . $strId . "'";

Howard
 
Hi

For example a missing dollar sign ( $ ) :
PHP:
[navy]$sql[/navy] [teal]=[/teal] [green][i]"update tbl_listings[/i][/green]
[green][i]set address =  '"[/i][/green] [teal].[/teal] [navy]$strAddress[/navy] [teal].[/teal] [green][i]"',city = '"[/i][/green] [teal].[/teal] [navy]$strCity[/navy] [teal].[/teal] [green][i]"',tg = '"[/i][/green] [teal].[/teal] [highlight][red]$[/red][navy]strTg[/navy][/highlight] [teal].[/teal] [green][i]"',beds = '"[/i][/green] [teal].[/teal] [navy]$strBeds[/navy] [teal].[/teal] [green][i]"',baths = '"[/i][/green] [teal].[/teal] [navy]$strBaths[/navy] [teal].[/teal] [green][i]"',terms = '"[/i][/green] [teal].[/teal] [navy]$strTerms[/navy] [teal].[/teal]  [green][i]"',sqft =  '"[/i][/green]
[teal].[/teal] [navy]$strSqft[/navy] [green][i]"', lot = '"[/i][/green] [teal].[/teal] [navy]$strLot[/navy] [teal].[/teal] [green][i]"',price = '"[/i][/green] [teal].[/teal] [navy]$strPrice[/navy] [teal].[/teal] [green][i]"',status = '"[/i][/green] [teal].[/teal] [navy]$strStatus[/navy] [teal].[/teal]  [green][i]"' where l_id  ='"[/i][/green] [teal].[/teal]  [navy]$strId[/navy] [teal].[/teal] [green][i]"'"[/i][/green][teal];[/teal]
Using an editor with syntax highlighting feature helps finding such typos.

Feherke.
 
thanks. I am new to php. Can you name free editors
 
I used to use gPHPedit, but I quite like geany
it copes with HTML, PHP javascript C & C++ & is also available on windoze if necessary
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top