Jump to content

incubator140

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

About incubator140

  • Birthday 04/03/1985

Profile Information

  • Gender
    Female
  • Location
    Trivandrum, Kerala, India

incubator140's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. $city ='city1, city2, city3'; $newCity = str_replace(',', "', '", $city); $sql = "select * from test where city in ('$newstr')"; This is working for me..
  2. Hi, Please try the following: $city ='city1, city2, city3'; $newCity = str_replace(',', "', '", $city); echo $newCity;
  3. hi, When i tried to restore DB using SQL Server 2005, am getting errors as follows. TITLE: Microsoft SQL Server Management Studio ------------------------------ Restore failed for Server 'INC133'. (Microsoft.SqlServer.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ The backup set holds a backup of a database other than the existing 'LenderDetails' database. RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3154) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=3154&LinkId=20476 ------------------------------ BUTTONS: OK ------------------------------ Can anyone help me? Thank, Bindi.
  4. Hello All, Donno you have faced such a problem. But I had a struggling day as it was not working for me, but I am able to find something which is interesting. I have a table like this CREATE TABLE `abc` ( `a` int(11) UNSIGNED NOT NULL, `b` int(11) UNSIGNED NOT NULL, `c` varchar(50) NOT NULL, UNIQUE (`a`) ) ENGINE=MyISAM; And I am using the following query to insert a record or update if exist. INSERT INTO abc (a,b,c) VALUES (1,200, 'test') ON DUPLICATE KEY UPDATE c='test' unfortunately, that's not working. But the following is working well. (the difference is just the data type of field 'c') CREATE TABLE `abc` ( `a` int(11) UNSIGNED NOT NULL, `b` int(11) UNSIGNED NOT NULL, `c` int(50) NOT NULL, UNIQUE (`a`) ) ENGINE=MyISAM; INSERT INTO abc (a,b,c) VALUES (1,200, 300) ON DUPLICATE KEY UPDATE c=300 Can anyone tell me how to get rid of these problem ( I don't want to do it in two queries ) Thanks in advance!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.