Categories > TinyButStrong general >

WHERES in an my sql query.

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: dale
Date: 2006-02-15
Time: 18:10

WHERES in an my sql query.

hey can anyone show me an short example on how to use where's in an mysql query using TBS.
plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz........
By: Skrol29
Date: 2006-02-15
Time: 19:04

Re: WHERES in an my sql query.

Hi Dale,

What do you mean by "how to use where's" ?

There is an example on merging with MySql at the Example page. There is no WHERE clause in the query, but you can add it as you like.

The source of this forum is also available for download and it is plenty of WHERE clauses.
By: dale
Date: 2006-02-15
Time: 19:21

Re: WHERES in an my sql query.

well can u see any errrors with this?

            $TBS->MergeBlock('blk1',$cnx_id,'SELECT * FROM '.$table_name.' WHERE (recipient=dale) ORDER BY recipient DESC') ;
By: Skrol29
Date: 2006-02-15
Time: 19:24

Re: WHERES in an my sql query.

(recipient=dale)
Are both "recipient" and "dale" two names of columns in the tables ?

It is maybe
   (recipient='dale')
By: Anonymous
Date: 2006-02-15
Time: 20:21

Re: WHERES in an my sql query.

i mean say if i have like
mysql table:
recipient             message
dale                       543545
ok                      545454
dale                     65656565

so if i wanted just to display the rows on the table but the recipient = dale
what would be the query for that?
By: dale
Date: 2006-02-15
Time: 20:55

Re: WHERES in an my sql query.

i mean say if i have like
mysql table:
recipient             message
dale                       543545
ok                      545454
dale                     65656565

so if i wanted just to display the rows on the table but the recipient = dale
what would be the query for that?
By: Tom
Date: 2006-02-15
Time: 21:50

Re: WHERES in an my sql query.

Did you follow Skrol message?
Post what error you are getting
Try simple...
$sql = "SELECT * FROM $table_name WHERE recipient='dale' ";
$TBS->MergeBlock('blk1',$cnx_id,$sql);
Also if you query only for recipient='xxx'
then no "ORDER BY recipient DESC" needed
By: dale
Date: 2006-02-15
Time: 22:03

Re: WHERES in an my sql query.

yea thanks guys