Forum: MySQL Jun 16th, 2009 |
| Replies: 5 Views: 758 ahhh, so for every record that exists in acts you are needing an update
my advice would be to use a sql 'for each' loop, you can use a cursor and iterate through each row and execute the update... |
Forum: MySQL Jun 15th, 2009 |
| Replies: 5 Views: 758 are you sure you are needing to do 34 updates, 9 records only need 9 updates
if the update isn't working properly, can you give us a little more of the schema and also what the distinct column is? |
Forum: MySQL Apr 7th, 2009 |
| Replies: 5 Views: 737 What is the result of the show full columns statement i sent you, if its latin1_bin thats why |
Forum: MySQL Apr 7th, 2009 |
| Replies: 5 Views: 737 also try this statement also
select * FROM assign2 WHERE UPPER(CONVERT(keyword1 USING latin1)) LIKE '%MICROSOFT%'; |
Forum: MySQL Apr 7th, 2009 |
| Replies: 5 Views: 737 What type of collation is this?
run this
SHOW FULL COLUMNS FROM assign2; |
Forum: MySQL Mar 16th, 2009 |
| Replies: 4 Views: 630 as long as the dns can resolve the hostname you can use the name in place of 'localhost' as well, this way if the ip ever changes it will still resolve to the correct address |
Forum: MySQL Mar 10th, 2009 |
| Replies: 2 Views: 403 this doesn't have error handling, but here is how you do it following your line
$result = $mysqli->query($queryStr);
$row_count = $result->num_rows;
$result->close(); |
Forum: MySQL Mar 6th, 2009 |
| Replies: 4 Views: 755 no, i don't believe the replace has that exact logic
show us your complete update statement or select whatever that may be, and lets go from there |
Forum: MySQL Mar 5th, 2009 |
| Replies: 4 Views: 755 add a where clause for
where str = 'jon' or str like ('jon %')
notice the space after jon |
Forum: MySQL Mar 4th, 2009 |
| Replies: 1 Views: 468 take a look at this line
rs.Fields("CITA") = Val(Me.TextBox14.Text)
change to
rs.Fields("CITA").value = Val(Me.TextBox14.Text) |
Forum: MySQL Mar 4th, 2009 |
| Replies: 17 Views: 1,432 Great working together everyone
As far as speed goes, I think its more in the indexes and proper keys and relational set up and the actual query rather than using the join alone
Just a simple... |
Forum: MySQL Mar 4th, 2009 |
| Replies: 17 Views: 1,432 look at my previous post with a subquery just for you javamedia :-)
i'm not against them at all, just meaning don't shy away from the joins, get a understanding of them and use them in combination... |
Forum: MySQL Mar 4th, 2009 |
| Replies: 17 Views: 1,432 sorry bout that, was a late night and didn't think twice about it
this will work
select
(select count(*) from posts p1 where p1.user_id = u.user_id) as post_count,
u.user_id
from users u... |
Forum: MySQL Mar 3rd, 2009 |
| Replies: 17 Views: 1,432 you are trying to do an inner join on something that isn't there, all users don't have posts
unlike javamedia, i would suggest trying to use inner or outer joins, at least to me it makes life much... |
Forum: MySQL Dec 2nd, 2008 |
| Replies: 2 Views: 1,489 terminate the first with a semicolon if that is what you are meaning, to compare two queries you use Query -> split tab and execute |
Forum: MySQL Dec 1st, 2008 |
| Replies: 6 Views: 524 right, sql express is ms sql not mysql, just trying to keep things in the correct forum |
Forum: MySQL Dec 1st, 2008 |
| Replies: 6 Views: 524 ok now theres a start, still in mysql forum, but we can work with this
close this thread, start one in mssql forum, then we can continue from there |
Forum: MySQL Dec 1st, 2008 |
| Replies: 6 Views: 524 you have an excel sheet or mysql database? this is the mysql forum |
Forum: MySQL Dec 1st, 2008 |
| Replies: 5 Views: 955 first we have to figure out where the problem is at
is the data stored with the cr lf's and not outputting correctly?
or not stored with formatting (incorrectly) and therefore outputting properly? |
Forum: MySQL Dec 1st, 2008 |
| Replies: 5 Views: 955 you gotta remember formatted text is specific to the application, i'm assuming from a text file it is CR LF, but in html you will need to use <P>, when you are running the select, what are you... |
Forum: MySQL Dec 1st, 2008 |
| Replies: 3 Views: 961 lol easiest way to explain it is be specific
from table1, table2 join table3 on id = table3.id
who knows what that means
now this |
Forum: MySQL Dec 1st, 2008 |
| Replies: 3 Views: 961 here i found an article on the suggestion i gave you earlier
its because order of precedence, also always try to do joins this way, makes much cleaner code
... |
Forum: MySQL Nov 30th, 2008 |
| Replies: 5 Views: 955 just a normal insert will work
what are you inserting from? |
Forum: MySQL Nov 25th, 2008 |
| Replies: 71 Views: 3,438 sure thing man, finally got up to veteran poster now along the way :-)
glad it all works for you, and i'm sure you understand relational databases much better
TORONTO here i come!!! |
Forum: MySQL Nov 25th, 2008 |
| Replies: 71 Views: 3,438 actually no need to check the uas table at all, just delete, then insert
you are correct, check user table i guess from a login or whatever that is, then no need to check anything against uas... |
Forum: MySQL Nov 25th, 2008 |
| Replies: 71 Views: 3,438 no need to do a check, just run the delete, it won't matter if there is a match or isn't
then just run inserts |
Forum: MySQL Nov 25th, 2008 |
| Replies: 71 Views: 3,438 constraints will do what you are meaning, delete from the user table then it will propagate to other tables that reference that user
lol did i put delete *, just use delete from without the * |
Forum: MySQL Nov 25th, 2008 |
| Replies: 71 Views: 3,438 well it doesn't make sense as far as the user won't have any services, from the database side it just means there is a user, just no services saved yet
yes users -> uas 1..x
it means a user has... |
Forum: MySQL Nov 25th, 2008 |
| Replies: 71 Views: 3,438 should be the opposite, user_id can't exist in the uas table without being in the user_table
delete from the uas table only, not user table
try to run the command without php and see if you get... |
Forum: MySQL Nov 25th, 2008 |
| Replies: 71 Views: 3,438 noooo, not the user table
this is what i was meaning, i think you are using $u_id
delete * from useraccessservices where user_id = $u_id
maintain the user table, how do you get to the... |
Forum: MySQL Nov 25th, 2008 |
| Replies: 71 Views: 3,438 ahhhh, well we have no deletes here
i don't really like this option, but would you want to delete all the rows for that user_id prior to doing updates and inserts?
(edit: stupid me, there... |
Forum: MySQL Nov 24th, 2008 |
| Replies: 4 Views: 654 you can specify sql user accounts and ip addresses if need be |
Forum: MySQL Nov 24th, 2008 |
| Replies: 71 Views: 3,438 print the query right before its executed once values are subbed in, need to see what is happening here |
Forum: MySQL Nov 24th, 2008 |
| Replies: 4 Views: 654 i don't think speed is necessarily going to be an issue, just be sure to make fk and primary keys, and indexes where necessary and you should be good using a single db
on top of that, it would be... |
Forum: MySQL Nov 24th, 2008 |
| Replies: 71 Views: 3,438 there will be an entry in the array for each service for that user, the part i'm not sure about is how are you having duplicate id's?
40
40
40?
42
42
42? |
Forum: MySQL Nov 24th, 2008 |
| Replies: 71 Views: 3,438 you can also use mysql_num_rows to the same effect
http://us.php.net/mysql_num_rows |
Forum: MySQL Nov 24th, 2008 |
| Replies: 71 Views: 3,438 thats it man
the reason why you have to query all three for the uas, is because user_id has multiple airports and multiple services for each, without a uas_id then you need to query against all... |
Forum: MySQL Nov 24th, 2008 |
| Replies: 71 Views: 3,438 sorry about that, all you need to do see if there is a result or not
here's a link if you are ever interested
http://pear.activeventure.com/package/package.database.db.db-common.getone.html |
Forum: MySQL Nov 24th, 2008 |
| Replies: 71 Views: 3,438 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 |
Forum: MySQL Nov 24th, 2008 |
| Replies: 71 Views: 3,438 see this database stuff isn't so hard now is it :-) |