Gossamer Forum
Home : General : Databases and SQL :

AdLength = 28

Quote Reply
AdLength = 28
Can anyone see why this wouldn't return a result?

UPDATE lsql_Links SET isValidated = 'No' WHERE Mod_Date = '2003-01-28' AND AdLength = 28

I've tried taking out the 'AND AdLength = 28, and it works fine (returns one affected row) ... it seems to be the AdLength = .. part thats screwing it up Unsure

I've tried changing it to;

AdLength = '28'
and
AdLength = "28"

Can anyone see why this wont work? I've been staring and playing with it for ages...and its quite honestly just pissing me off Frown

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] AdLength = 28 In reply to
Oh, and in the table, the AdLength field does exist...and there is a link in there with Mod_Date => '2003-01-28' and AdLength => 28. Before anyone asks me to check the DB Tongue

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] AdLength = 28 In reply to
I don't see a reason for it not to work as long as the Mod_Date and AdLength values are correct.

Make sure you don't have any blank spaces or anything.
Quote Reply
Re: [Paul] AdLength = 28 In reply to
Thats what I thought....its really weird Unsure

DB Dump gives;

CREATE TABLE lsql_Links (
ID int(10) unsigned DEFAULT '' NOT NULL auto_increment,
Title varchar(100) DEFAULT '' NOT NULL ,
LinkOwner varchar(50) DEFAULT 'admin' NOT NULL ,
Add_Date date DEFAULT '0000-00-00' NOT NULL ,
Mod_Date date DEFAULT '0000-00-00' NOT NULL ,
Description text ,
Contact_Name varchar(255) ,
Contact_Email varchar(255) ,
Hits int(11) DEFAULT '0' NOT NULL ,
isNew enum('No','Yes') DEFAULT 'No' NOT NULL ,
isChanged enum('No','Yes') DEFAULT 'No' NOT NULL ,
isPopular enum('No','Yes') DEFAULT 'No' NOT NULL ,
isValidated enum('No','Yes') DEFAULT 'Yes' NOT NULL ,
Rating float(12,2) DEFAULT '0.00' NOT NULL ,
Votes smallint(5) unsigned DEFAULT '0' NOT NULL ,
Status smallint(6) DEFAULT '0' NOT NULL ,
Date_Checked datetime DEFAULT '0000-00-00 00:00:00' ,
Timestmp timestamp(14) ,
Phone varchar(100) DEFAULT '(Area Code)' NOT NULL ,
Recommended int(11) ,
URL text ,
AdLength int(11) DEFAULT '14' ,
AlertMessage varchar(255) DEFAULT 'NotSent' ,
PRIMARY KEY (ID),
KEY userndx (LinkOwner),
KEY popndx (isPopular),
KEY stndx (Status),
KEY newndx (isNew),
KEY valndx (isValidated),
KEY Phone_idx (Phone)
);


INSERT INTO lsql_Links VALUES('53','test advert','admin','2003-02-25','2003-01-28','wdterjt','fwrwer test','webmaster@ace-installer.com','0','Yes','No','No','No','0.00','0','0','2003-02-25 09:31:59','20030225100412','(3435) 34535345','0','','28','NotSent');

Notice fields 5 and 22 are the ones in question.

Thanks for the reply Smile

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] AdLength = 28 In reply to
Because that row already has isValidated = 'No', so there is no rows updated.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] AdLength = 28 In reply to
OMG..how stupid was that... You are totally right Alex....setting it back to 'Yes' made it work fine Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!