you sure you mean $aid instead of $a_id
also your update statement needs to be based on uas_id, otherwise , you will have multiple rows for each user in the update
you sure you mean $aid instead of $a_id
also your update statement needs to be based on uas_id, otherwise , you will have multiple rows for each user in the update
see this database stuff isn't so hard now is it :-)
agree with stultuske, quite a cumbersome task
not sure how your db is laid out, but typically what you would do insert a new record with a timestamp and only pull from the latest timestamp's results
also you could set a boolean value for the row, to show if its inactive or active, and only pull rows where active =1, and still maintain the old rows
Correct, if you delete an airport or service then all records that reference that airport or service needs to be deleted as well
deletes on those CAN only happen in the primary tables(airport, services)
what i was referring to was if a user has a service, then the service is removed for that user only, the delete needs to happen in the uas table
ex (userid 1 has ground and glycol for airport id 2, now we want to remove ground for user 1 for airport 2, we only delete the uas record for that user in the uas table)
you are correct, String.split is the way to go to treat it the same as the tokenizer
the other way would be to use regex
the uas should allow deletes, inserts, and updates with no cascading, if you think of it, this is a bottom level table, no tables depend upon it, it depends upon other tables
if user_id gets updated in the user table, then the uas table needs updated as well, not the other way around
if the service_id gets updated in the services table, then the uas table needs updated, same way as before, not the other way around
i don't know exactly what error you were getting, but any changes to the uas table should affect key constraints on any other table, as long as user_id, service_id, and airport_id match, deleting or inserting should not affect anything
i would suggest closing this post and starting it in the ASP.net forum, also when you create that post, be specific with what issue you are having, not just lay it out all at once
if you can't connect then say that, if you can't create a query then say that
i guess i misspoke, you are going to query a database and what language are you planning on using for that?
also you need to make an effort and show us what you got so far, we won't do it for you
also what you could do which would probably be a better solution, just maybe more time consuming, is to create a hidden field that goes with each checkbox that stores the user_airport_services_id, if exists set it, otherwise set it to -1, then you can check if hidden field is -1 insert, otherwise update
<input type="hidden" id="YAVGLYCOL" value="4">
<input type="hidden" id="YAVJET" value="-1">
basic example, but you will know glycol has been assigned and to do an update, and jet hasn't and do an insert
up to you, which way you want to go with my previous post as well
MySql 2000? or MSSQL 2000?
also, what language are you using?
make sure your reference is to C:\Program Files\Reference Assemblies\Microsoft\VSTO...... and not C:\Program Files\Common Files\Microsoft Shared\VSTO .......
lol whoaaa now
might have to come for toronto, can never turn down a free beer
you almost got it, what you can do is for each checkbox value, query the table, if exists, do an update, if not, do an insert
$query = "SELECT user_airport_services_id FROM user_airport_services WHERE user_id = '$u' AND SERVICE_ID='$s" AND AIRPORT_ID ='$a'";
$uasid= $db->getOne($query);
if ($count>0){
$query = "UPDATE user_airport_services SET ........ WHERE user_airport_services_id=$usaid;
}
else{
$query = "INSERT INTO user_airport_services .........
}
$db->query($query);
instead of OpenSubKey, use CreateSubKey
yes, except the left join on user_id
the where clause is limiting the results to only ones that exist, if the change doesn't show the results properly, then let me know, and it can be modified
reverse the statement and use a left
select ....
from airports
left join user_airport_services
on ....
i don't have a mysql database in front of me right now, but trying changing that statement i gave you, to a right join instead of inner
lol but then again, we always know its sivak when the title is hi
i don't see how you are expecting idx = NULL for 2-6, when you have both entries for idy in both tables
are you sure this is what you are wanting?
its kind of hard to say when to just use webservices without context, a common example is communicating with a remote server, or writing a webservice for a third party to communicate with your code
select DATEDIFF(now(), '2008-12-25)
you need to specify inner join on (columnname)
maybe i just don't get it, lol but i cannot understand what you are trying to do here
have you tried disabling all caching together?
might be easier to start that way, then try to enable it
not quite sure what you are meaning, show me what you want your result set to be and what your current query is
lol yeh man, it worked fine, will you post the whole class structure then?
just to make sure, you have used the full path
C:\folder\Data.xls?
what version of excel?
hmmm, compiles fine for me
you sure Expression.Valoper is the same class as Valoper?
for sure your events are registered?
I think you have an extra TextBox here, the only one you need is the textbox in the toolstrip
for the toolstrip textbox to change as you click on a url, make sure have this event in there
private void webBrowser1_Navigated(object sender,
WebBrowserNavigatedEventArgs e)
{
toolStripTextBox1.Text = webBrowser1.Url.ToString();
}
for one, you don't need to call WorkBookToOpen.ToString(), it already is a string
is workbooktoopen a valid path? and are you calling open first?
what are you wanting the TextBoxAddress to be?
i thought you were typing in a url and hitting enter
in that method run your check that i gave you from before
if ((int)e.KeyChar == (int)Keys.Enter)
{
//not sure what box has your url, but put it here
Navigate(toolStripTextBox1.Text);
}
event i believe is only only available in 5.1.6
select into with my sql is an insert statement with a select
insert into Out(recipient, Text)
select recipient, Text from Schedule where TimeToSend = curdate();
i would suggest timetosend be <= curdate(), you'll never get a match exactly on times most likely unless you are going by date only
capture keypress event from your form
are you catching the key press event and checking for enter?
if ((int)e.KeyChar == (int)Keys.Enter)
{
Navigate(toolStripTextBox1.Text);
}
basically there will be rows, that will be null (its set to 0 in the the if statement), because the rows are columns, if the service_id != 1 then the row will be null
therefore, the max will pull the highest, which will be 1 if the entry is there
think of it like for columns JET GROUND and GLYCOL
1 0 0
0 1 0
0 0 1
the max, allows us to group these three rows and select "1" if the service is enabled, although its in a different row
let me know if i need to explain it a little better
you shouldn't be able to restore a transaction log that isn't in the proper sequence, you will only be able to restore up to the point the last sequential transaction log
you must also apply all transaction logs before recovering the database, otherwise you must start over
so you got it all worked out now?
this should do the trick, the only problem is if you ever add services, you will need to change the query to reflect that
select usr_id_users as USR_ID, airport_id_airport AS AIRPORT_ID,
a.airport_code AS AIRPORT_CODE,
max(if(service_id_service=1, 1, 0)) as JET,
max(if(service_id_service=2, 1, 0)) as GROUND,
max(if(service_id_service=3, 1, 0)) as GLYCOL
FROM userairportservices uas
INNER JOIN airport a
on a.airport_id = uas.airport_id_airport
-- change this for different users
where usr_id_users = 1
group by airport_id_airport;
sure man, will work on it right after i get to work in the morning
...ahhhh, a fresh mind
perfect english :-), lol well at least typing
maybe when the users are on the system tomorrow, run show processlist again, and you can see what may be causing the problem
here's a sample of what it will look like
http://free.netartmedia.net/Databases/Databases4.html
you can tell what the connections are doing with themselves :-)
you can run the show processlist as a query in mysql
also, are you reusing your connections or creating new ones on that page?
thanks, how soon do you need it?
cool if i get back with you in the morning?
the table schema, if you want you can send a backup if its small enough
will you post the structure and i get you a query?
ahhhh, one thing i just thought of
what does allow_persistent show?
its in the php.ini file
what did your "SHOW PROCESSLIST" command show?
yes they are closed at the end of the script, just wondering if for some reason a script doesn't get completed and isn't closed
lol this one is starting to make me think
are you for sure you are calling ?
mysql_close($conn);
just to be sure this is what you are meaning, here's a similar post
http://www.daniweb.com/forums/post735371-9.html
is this what you want?