I have to increase 'no_of_visits' for 1.
Using UPDATE function is easy:
update visits set no_of_visits=no_of_visits+1 where visitor_id=123
but, how it should be (if possible at all) if I want to use REPLACE
function?
I tried something similar
replace into visitors values ($visitor_id, (no_o
PJ wrote:
I think this is a tough one... and way above my head:
PLEASE READ ALL OF THE ABOVE TO UNDERSTAND WHAT I AM TRYING TO DO.
Having a bit of a rough time figuring out how to formulate php-mysql to insert
data into fields using a multiple dropdown box in a form.
to post I am using the fo
"
AND pm.pm_id=o.payment_method
AND f.form_id=".$form_id."
AND r.reg_id=o.registered_id
AND a.reg_id=r.reg_id
AND a.address_type='Business'
in this case I have to create string REGISTERED_BY by php.
reason I did it as example 1 is because I read in few books and onli
hi,
I have a table with tasks. column "status" could be 1 (means "todo") and
0 (meas "done").
also,have column "order_no" to sort tasks by priorities.
once in a while order_no is not "in order", e.g 1, 2, 3, 5, 6, 8, 11,
12, 13, 19, 20,... (some numbers are missing).
is there built in function to
/5.0/en/string-functions.html#function_concat-ws
---
CONCAT() returns NULL if any argument is NULL.
CONCAT_WS() does not skip empty strings. However, it does skip any
NULL values after the separator argument
---
Ewen
On Wed, May 14, 2008 at 5:53 PM, Afan Pasalic <[EMAIL PROTECTED]> wrote:
h
addresses a
WHERE
r.reg_id=121
Randall Price
Secure Enterprise Technology Initiatives
Microsoft Implementation Group
Virginia Tech Information Technology
1700 Pratt Drive
Blacksburg, VA 24060
-Original Message-
From: Afan Pasalic [mailto:[EMAIL PROTECTED]
Sent: Wednesday,
does skip any
NULL values after the separator argument
---
Ewen
On Wed, May 14, 2008 at 5:53 PM, Afan Pasalic <[EMAIL PROTECTED]> wrote:
hi,
I have query
SELECT CONCAT(r.first_name, ' ', r.last_name, '\n', r.organization, '\n',
r.title, '\n',
hi,
I have query
SELECT CONCAT(r.first_name, ' ', r.last_name, '\n', r.organization,
'\n', r.title, '\n', a.address1, '\n', a.city, ', ', a.state, ' ',
a.zip, '\n', r.email)
FROM registrants r, addresses a
WHERE r.reg_id=121
if any of columns has value (e.g. title) NULL, I'll get as result 0
Matthew Stuart wrote:
> I have a DB that has a field in it that currently just holds single or
> double numbers - these numbers are basically a reference to a category
> in which the particular record should be displayed. However I have now
> been asked if I can make it so that a particular record
Matthew Stuart wrote:
> I have a DB that has a field in it that currently just holds single or
> double numbers - these numbers are basically a reference to a category
> in which the particular record should be displayed. However I have now
> been asked if I can make it so that a particular record
try REPLACE
http://dev.mysql.com/doc/refman/5.1/en/replace.html
-afan
Steffan A. Cline wrote:
I am trying to think of a trick way to handle something. I have been
successful in using the multiple inserts in one row by using the
,(xx,xx,xx),(xx,xx,xx),(xx,xx,xx) in a values block. BUT Is it poss
yes. just found it.
it's funny, I was looking for it last half hour and the second after I
sent the email - I found it.
:)
yes, yes... I know. RTFM
:D
thanks.
-afan
sol beach wrote:
SET Column type?
On Dec 6, 2007 2:01 PM, Afan Pasalic <[EMAIL PROTECTED]> wrote:
hi,
I wond
hi,
I wonder if mysql has something like ENUM() but instead ONLY ONE it
could be selected ANY COMBINATION of these offered solutioins?
If column is ENUM('a','b','c','d') I can select 'a' or 'b' or 'c' or
'd'. Clear.
Tough, I need SOMETHING('a','b','c','d') that I can select 'a' and 'b',
or 'b',
ords under Tools-> Preferences and
changing the "Max Rows For Generated Queries" to whatever you want, set
to zero removes the limit entirely.
On Sat, 2007-12-01 at 15:17 -0600, Afan Pasalic wrote:
Hi,
on Linux version of MySQL Browser (v 1.2.4 beta), when double-click on
any table, default q
Hi,
on Linux version of MySQL Browser (v 1.2.4 beta), when double-click on
any table, default query is
SELECT * FROM LIMIT 0,1000
On Win version (v 1.2.9 rc), there is no LIMIT part - what caused me to
pull so many times tens, even hundreds thousands of records.
I was looking for in setting f
ven date between 8 AM and 4 PM */
SELECT COUNT(*)
FROM table t
WHERE t.created_at >= "2007-11-20 8:00"
AND t.created_at <= "2007-11-20 16:00";
MySQL's docs on date and time functions are here:
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
HTH,
D
Hi,
I have to build a report - when (date and/or time) the records are
inserted. E.g., number of records inserted on Monday - doesn't matter
what month.
Or, number of records inserted on specific date between 8am and 4pm.
Thanks for any help.
-afan
--
MySQL General Mailing List
For list arc
Yup! That's THE ONE!
Thanks Rajesh.
-afan
Rajesh Mehrotra wrote:
> Hi,
>
> I think "GROUP_CONCAT" will do it.
>
> -Raj.
>
>
>
> -Original Message-
> From: afan pasalic [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 16, 2007 11:49
hi,
I have "standard" organizations table with org_id, name, address,
city,... columns.
CREATE TABLE `organization` (
`organization_id` int(8) unsigned NOT NULL default '0',
`address_id` int(8) unsigned default NULL,
`full_name` varchar(255) default NULL,
`phone` varchar(255) NOT NULL def
On table it is! :-D
Thanks to all of you who helped me with my "problem".
-afan
John Meyer wrote:
> Afan Pasalic wrote:
>> hi,
>> I have a employees table (first name, last_name, address, city,
>> state, zip, phone,...).
>> though, I got a requested to a
hi,
I have a employees table (first name, last_name, address, city, state,
zip, phone,...).
though, I got a requested to add additional info about people, like
phone_extension, zip+4, nick, DOB... that will not be used very often.
what would be better solution:
a) add these columns to employees
hi,
on production server, while developing, I did some changes on some
tables (I added few new columns on several tables).
now, after the new web app is finished and tested, I have to upgrade
(php) the app on production server.
what steps do you recommend to do the tables update on the product
Baron Schwartz wrote:
Hi,
Afan Pasalic wrote:
Baron Schwartz wrote:
Hi Afan,
Afan Pasalic wrote:
hi,
if I have column order_id(int(4)) null do I have to index it too.
I'm going to use it ONLY for sorting records.
It depends a lot on how much data is in the table, etc etc. An
Baron Schwartz wrote:
Hi Afan,
Afan Pasalic wrote:
hi,
if I have column order_id(int(4)) null do I have to index it too. I'm
going to use it ONLY for sorting records.
It depends a lot on how much data is in the table, etc etc. An index
will make sorting more efficient in the ge
hi,
if I have column order_id(int(4)) null do I have to index it too. I'm
going to use it ONLY for sorting records.
thanks.
-afan
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Hi,
I'm looking for database modeling tool form MySQL. Anybody used the
MySQL Workbench? I know the Workbench is in Alpha production, though
some "hints"?
How about DB Designer?
Thanks for any respond.
-afan
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To u
INSERT INTO ztipos (type) VALUES (SELECT DISTINCT type FROM locais)
?
-afan
Miguel Vaz wrote:
Hi,
I have a table LOCAIS with:
idtypedesc
1t1blah blah
2t1uihuih
3t2pokpokp
I want to list only the distinct types and create a table
hi,
I'm trying to build a simple bulletin board, just topics and posts.
created following tables:
CREATE TABLE `topics` (
`topic_id` int(8) NOT NULL auto_increment,
`author_id` int(8) unsigned NOT NULL,
`topic_title` varchar(255) collate utf8_unicode_ci default NULL,
`topic_date_entered` date
Hi Sheeri
No, I wanted to search through both columns in the same time (and it
will be always at the same time) - the problem was I didn't know that I
have to have one multi-column index.
:)
But, it's fixed (after really helpful comments on this mailing list) and
works perfect
:)
Thanks to
No, not exactly. More as "there is a solution"...
What would be the best way to do?
-afan
Paul DuBois wrote:
At 20:52 +0200 4/27/06, [EMAIL PROTECTED] wrote:
Hi,
I was trying to list all registeed users they are "online" last 15
minutes.
I can do it by using timestamp:
= '$start_time'
?>
30 matches
Mail list logo