I usually go for the subquery version and I believe this will work:
update table2
set total score = (select sum(score) from table1 where table1.id = table2.id)
I usually go for the subquery version and I believe this will work:
update table2
set total score = (select sum(score) from table1 where table1.id = table2.id)
A couple of possibilities come to mind:
Could be over heating. If the CPU Fan gets clogged or has something covering the intake the laptop will shutdown to prevent you from burning out the CPU. Check to fell if you have some sort of air flow out of the vents on the laptop.
Do you get any sort of message on the screen or does it shut of immediatly? If it is shutting down immeditly then you have a mmajor hardware issue. If nothing else open the covers on the bottom of the laptop and make sure the memory is seated correctly.
Hello,
You probably need to make sure that IPv4 is enabled under the Properties for the Network card especially if you are connecting to an older router or modem. Many of them are not configured for IPv6.
Under Device manager do you see a heading for Network and is there at least one device listed under it?
If you reinstalled have you installed the chipset drivers for your computer? Without the chipset drivers your system does not know how to talk to the internal devices on the system bus. It may see a network device connected but can report it as the wrong device and will not be able to communicate with it.
How are you connecting wired or wireless?
If wired then check for a link light on the port on the modem/router and on the computer. If you have a link light and it is flashing every now and then then you are connected and seeing traffic.
If wireless then you need to set up the wireless security to allow you to connect to your network. You should have some sort of wireless connection utility.
First you need to determine what memory is actually in the computer and how many chips (SIMMs - Single Inline Memory Modules) you have. Next figure out what speed or type they are (PC3200, PC2100, PC2700, etc.) and are the chips the same type.
Tell me that and I will be able to tell you more.
Excel will save files as a .CSV (Comma Separated Values) and MySQL will import a .CSV easily. I would recommend that you first import your data files then update other tables using the tables you imported. Normally I drop the tables and re-create them prior to each import to prevent problems.
You can either use a MySQL LOAD statement or the mysqlimport application which calls the LOAD statement from MySQL.
Yes it is possible because of a couple of things.
If it is a Dell and is set for OS install mode in the bios. It decreases the available ram to 256MB.
IF you have two ram chips and one is either the wrong speed, bad or a different speed.
Do you get any messages on the screen at all?
Can you get to the BIOS setup screen?
Hellop,
It is hard to tell with out all of the code but I am guessing that line 90 in your error messages is line 14 above. Do you initialize $size anywhere with something like:
my $size = 0;
Hello,
What you need to do is create a couple of sub queries and then combine them for the final answer. Here is an example from the OReilly MySQL Cookbook that does something like what you want.
The percentages represent the ratio of each driver's miles to the total miles for all drivers. To perform the percentage calculation, you need a per-group summary to get each driver's miles and also an overall summary to get the total miles. First, run a query to get the overall mileage total:
mysql> SELECT @total := SUM(miles) AS 'total miles' FROM driver_log;
+-------------+
| total miles |
+-------------+
| 2166 |
+-------------+
Now, calculate the per-group values and use the overall total to compute the percentages:
mysql> SELECT name,
-> SUM(miles) AS 'miles/driver',
-> (SUM(miles)*100)/@total AS 'percent of total miles'
-> FROM driver_log GROUP BY name;
+-------+--------------+------------------------+
| name | miles/driver | percent of total miles |
+-------+--------------+------------------------+
| Ben | 362 | 16.7128 |
| Henry | 911 | 42.0591 |
| Suzi | 893 | 41.2281 |
+-------+--------------+------------------------+
To combine the two statements into one, use a subquery that computes the total miles:
mysql> SELECT name,
-> SUM(miles) AS 'miles/driver',
-> (SUM(miles)*100)/(SELECT SUM(miles) FROM driver_log)
-> AS 'percent of total miles'
-> FROM driver_log GROUP BY name;
+-------+--------------+------------------------+
| name | miles/driver | percent of total miles |
+-------+--------------+------------------------+
| Ben | 362 | 16.7128 |
| Henry | 911 | 42.0591 |
| Suzi | 893 | 41.2281 |
+-------+--------------+------------------------+
So you are calling bash from the correct location it has to be in your script. Can you give us the command line you are using and the script to look at or we wont be able to help.
Did you uninstall, clean the registry, and reboot then install as if new?
Hello,
Your going to need to uninstall SQL Server, clean out the registry entries for SQL server and then reinstall it to correct the issue.
Hello,
OK a couple of things.
Using PHP to do your backups is a bad idea because the only files that PHP can access are the files that a web user can access and that is why your backup is smaller that the actual directory structure. And this script isdesigned for a single sitte not multiple sites.
Are you running this on Windows or Linux based server? In either case there are Linux shell scripts and Windows Power Shell scripts that will do this properly and retain the permission and ownership settings of the files when they do it. Tell us which OS and we will make suggestions on how to do it properly.
Hello,
In order to help we will need three things:
A listing of the shell script with the permissions on the file.
A listing of the code in the file.
The actual command line you are using to call the script.
Hello,
You would have to have the same host entry on the client also or use the IP address of the server.
Hello,
A router and a switch are not the same thing. A router will have settings where you can set up DHCP and a WAN port and several LAN ports and can use NAT (Network Address Transation) top give multiple private IPs fot a single public IP. A switch is simply a jusction box that allow the systems to connect and does not do much else.
I use a router at home that my internet modem is connected to. The cable modem goes to the WAN port and receives a single dynamic (DHCP) address from my service provider. In the router I have DHCP set up to provide addresses over the LAN ports and the router uses 192.168.2.1 and is the gateway for my LAN. My Linux server is at 192.168.2.100 and the WIndows Server is at 192.168.2.101 both with a netmak of 255.255.255.0. DHCP is running on the route for the LAN and uses addresses 192.168.2.2-192.168.2.99 NM 255.255.255.0.
Hello,
Kind of a catch 22 thing. You would have to have a processor of some sort to be able to update the BIOS. Which means that you would have to buy a slower i7 to be able to get the update done.
I suggest you contact the store you bought it from or BIOSTAR and see what they say.
Hello,
Looks like BIOSTAR site says that you have to have the latest BIOS update before that board will work with the processor you listed. Does not really say how you can get to that BIOS.
*In order to support IVY Bridge-E CPU, customer need to upgrade the latest version BIOS and driver
Hello,
What you need is a router instead of a switch. A simple 4 port router will have a WAN connection that you can connect to the WiMAX and 4 LAN ports that you can connect everything else to. You can then put the other static devices on the LAN ports and work from there and if you ever need it you could get the other three systems to the internet.
If I remember correctly the WiMAX uses 192.168.15.X for the subnet it is assigning IP in. If you moved your static devices to the 192.168.15.X subnet with a netmask of 255.255.255.0 with no gateway assigned and let your computer get the dynamic IP from the WIMAX or a new router you would be able to talk just fine.
Hello,
What are you talking about when you say you want to align your partition? You do realize that if you change a partition size on the fly that you could lose everything on that partition. Yes there are programs that will do it but it is not a good idea. If you are talking about making all of the partitions the same size then I have to ask WHY??
If you are a computer freshman then the last thing you should be doing is messing with the partitions on a working system. If you want to play with partitions then get a secondary drive and mess around with it instead of killing your current system because you did not know any better.
Hello,
The best advice I can give you is to make two lists. Reasons to take the Job and Reasons not to take the Job. Your subconscience will help you make what you really want to do the longer list. And also consider what the company you interviewed with produces and do they have a lot of positions for the job you really want? If they do a lot of web development then there is a chance that the support engineer job could lead you to a position in another department and could get you exposure with the department managers of the groups you want to work in. Personally I have to add make sure you find a job doing something you enjoy, then going to work will be enjoyable instead of just going to work for a paycheck.
Good Luck,
Hello,
The first thing to do is to run the command and see what the output is. When I run the following on my system I get the 0 you are looking for:
[rod@hpsrvr ~]$ /bin/ps -ef | grep ScriptXYZ.sh | grep -v grep | wc -l
0
There is no reason that this should not work.
There must be something else in you program that it does not like.
I used your example but checked for httpd instead of a script and th ran fine.
[rod@hpsrvr ~]$ cat test.sh
#!/bin/bash
myvar=$( /bin/ps -ef | grep httpd | grep -v grep | wc -l)
echo $myvar
[rod@hpsrvr ~]$ ./test.sh
12
Post your code and maybe we will see something.
Hello,
Unless I am mistaken the issue is with the Home Premium version of Windows 7. It is only designed to see computers in a Homegroup and does not support other networks or domains. Below is a link to the Microsoft page that shows the capabilities of each version of Windows 7. You need at least Windows 7 Professional to see the XP systems on the network.
Hello,
If this is a windows XP systems you have to add the IPS/SPX protocol to the network device under properties. Also check the windows firewall and temporarally turn it off till after you connect to the other system the first time it will see them after that.
So there is no user called garrett with Host = localhost but it could be in there another way (i.e. garrett@%). Try just this and see what you get:
select * from mysql.user where User = 'garrett';
If you still get 0 rows then he does not exist. To add the user you will need something like this to create the user and them give them access to a specific database:
CREATE USER 'garrett'@'localhost' IDENTIFIED BY 'some_password';
GRANT ALL PRIVILEGES ON some_database.* TO 'garrett'@'localhost'
WITH GRANT OPTION;
let us know how it goes.
Hello,
It sounds like there is something in your php code that is deleting the table out of the database. Do you have a backup of the tables fromm before you started accessing them with php?
If you created the table initially by using php and your running the same script again that that would cause what you are seeing. I suggest that you drop the table completely using phpmyadmin and then run the code that created the table correctly the first time. Export the data using phpmyadmin to a CSV file or use the backup database options.
Then run your php web pages and see if it corrupts them again. If so post your php code and we will seee what we can figure out for you.
And meaning no disrespect Rev. Jim but MySQL is not MS SQL Server and the data structure and ability to read/write files are quite different. Although your suggestion is logical it is not really going to be much help, especially if he is on a shared linux host instead of a windows system.
Hello,
Try this for your statement:
$sql = "SELECT Distinct p.p_id, p.p_active, p.p_sku, p.p_slug,
p.p_title, p.p_desc, p.p_price, p.p_qty, p.p_instock, i.p_img_id,
i.p_img,i.p_img_thumb, i.p_id, c.c_id, c.c_title, c.c_slug
FROM products AS p
INNER JOIN categories AS c ON p.p_catid = c.c_id
INNER JOIN product_img AS i ON p.p_id=i.p_id
WHERE p.p_catid='$c_id' AND p.p_active='1' ORDER BY p.p_id DESC";
Hello,
You probably do not have php installed on in the system. Ubuntu uses apt-get from the command line or software manageer from the gui to add applications. Since it sounds like you already have apache installed, to install php and the php-mod for apache from the terminal (command line) use the following commands:
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart
The sudo command will run the commands as root.
Rubberman, as usual, is correct.
One of the most important things you can do to make your cache more efficient is to make sure there is plenty of RAM in the server. To make the most efficient use of real memory, Linux automatically uses all free RAM for buffer cache.
Here is a site that will give you a good idea of what a cache buffer is used for and how a linux system uses it to make it more effecient.
The Buffer Cache
Hello,
This answer is if your web site is on one server and the database is on another and your database is in MySQL.
What you need to do is to create a login to mysql for the <database user>@<the server you are requesting the data from>.
For example:
Lets say your web server is at 10.0.0.5 and the database server is at 10.0.0.10
And the user that you want to access the database with is called dbuser then in MySQL now you probably have a user like this:
dbuser@localhost
You need a user like this:
dbuser@10.0.0.5
with the same privledges as the original user.
The sql code to add this user would be:
USE mysql;
CREATE USER 'dbuser'@'10.0.0.5' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON <database>.* TO 'dbuser'@'10.0.0.5'
WITH GRANT OPTION;
Where <database> is the actual name of the database you want them to have access to.
Hello,
The warning you are getting is telling you that the hostname of the server (which you said has no full stops) cannot be resolved to a IP address. You can fix this in one of two ways:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 mycpanelserver
Hello,
I had an HP connected to a docking station and it is possible to get two monitors working. You have to have the laptop in the docking station when you boot it up and both monitors powered on. IF you go to the detect displays option in windows you should see all three monitors. You have to disable the laptop display in this screen, apply and then you can enable both external monitors. The monitors will need to be connected to the ports on the docking station and not to the laptop its self.
Hello,
Based on the output from your system you are resolving names ok. The thing that I did not read closely enough the first time was the comment on your using Tor Browser. I am curious as to why you would think that Tor Browser is the only one you can use? All a browser really does is to make the web pages you receive from servers have the proper format on your screen. Tor just gives you the ability to view the internet anonymously.
There is an artile you might want to review on Tor about a problem just detected.
Hello,
Your going to have to test to see if the number is in a list of the prime numbers. They are fixed after all and you can find out what they are in multiple places on the internet.
For example here is a site that has the first 1000 primes:
Hello,
In order to find out what is going on you really need to start with the basics. On your computer open a command prompt. Under Start, All Programs, Accessories, Command prompt. You will get a window that takes you to the old msdos prompt.
ping 4.2.2.2
You should get someting like this back:
C:\Users\Rodney>ping 4.2.2.2
Pinging 4.2.2.2 with 32 bytes of data:
Reply from 4.2.2.2: bytes=32 time=32ms TTL=49
Reply from 4.2.2.2: bytes=32 time=31ms TTL=49
Reply from 4.2.2.2: bytes=32 time=29ms TTL=49
Reply from 4.2.2.2: bytes=32 time=43ms TTL=49
Ping statistics for 4.2.2.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 29ms, Maximum = 43ms, Average = 33ms
You probably will so step 1 is done.
Can you resolve DNS names. Basically this means can your computer ask the internet to convert a domain name to an ip address and can you get to that address.
C:\Users\Rodney>ping google.com
Pinging google.com [74.125.227.206] with 32 bytes of data:
Reply from 74.125.227.206: bytes=32 time=12ms TTL=52
Reply from 74.125.227.206: bytes=32 time=12ms TTL=52
Reply from 74.125.227.206: bytes=32 time=14ms TTL=52
Reply from 74.125.227.206: bytes=32 time=12ms TTL=52
Ping statistics for 74.125.227.206:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 12ms, Maximum = 14ms, Average = 12ms
If …
Hello,
Since you already found the site for the driver what you are missing is the order to install them. The first driver you need to download is the chipset driver. You have to have the chipset driver loaded before you can access any additional devices in the computer properly. Without it any driver you try to install for a built in device will not be able to communicate with the device. Once you install the chipset driver I will be willing to bet you can install the others without any problems.
Hello,
Here is something I had to use once on a system that did not ahve ls...
echo .*
only gives you back the results like ls with not size or other data.
Hello,
The problem is that you do not ahve the mysql serve running which is called mysqld. You may not have it installed but and the client and server are two different packages.
Hello,
The etc hosts entry should override the information being pulled for DNS from any nameserver. Based on my own mistakes have you checked the speling in /etc/hosts and on the Location entry?
Do you have any sites running on the server or is this the first site you are adding?
Since it is Linux you are probably using Apache for the web server. Have you check to make sure Apache is running?
How is the site defined in the /etc/httpd/conf/httpd.conf file (probably under Virtual Hosts). It should lokk something like this:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /www/docs/dummy-host.example.com
ServerName dummy-host.example.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
You could try using telnet or lynx to connect and see what response you are getting:
telnet <ipaddress> 80
Lynx is a text based browser that runs under Linux.
If you simply ping from the server with:
ping www.mysite.com
what do you get back? You should see the ipaddress that is being pinged.
Hope this helps.
Hello,
I am pretty sure that you can turn the router into a simple switch. You would still be able to use the wireless capability but you would use the DHCP from the the UVerse router. If you run into issues you an go on line to the Linksys site and chat with a tech about how to set it up.
Hello,
I would import the CSV file into the MySQL database as a different table. For example if the table in the current database is customers then make the import table customers1. Then use sql queries to compare the two tables. This type of query is what MySQL is designed for.
MySQL has an import function called mysqlimport that can be run form the command line and is designed to import text files like csv files. If you have any type of GUI interface (like phpmyadmin or mysqlworkbench ) most of them have built in options to load a csv file.
The a query to find matching records or records in table1 not in table2 is easy to write.
Hope this helps.
Hello,
You said you could hear beeping from the computer when you boot. Is it just one beep? If not the beep codes are designed to help you diagnose errors. You need to determine what the pattern is (i.e. One long beep repeated continually, 2 shorts and a long beep, or 3 long beeps, etc.) From there Google CMOS beep codes. Here is a link to a site that explains what several manufactures beep codes are and what the computer is doing to generate them.
Hello,
I would try uninstalling the driver and then power off the computer. Next power the computer on and see what the system installs for the device. But if you can provide more information such as:
What OS are you running on the computer?
Is this a tower or notebook?
What type of drive is the CD-ROM (IDE, SATA, USB, etc.)?
If it is IDE is it the only CD-ROM drive in the computer and is it on a cable by it's self?
Does the computer CMOS (BIOS Setup) see the drive and have you gone in and to setup and let the computer recognise that a new drive is in the system?
Hope this helps...
Hello,
Yes it would and they would not match if the names are like the example you provided. But technically Jean Brown is not a match for Jean Paul Brown and it should not be. If it is a small data base then you could try splitting the names apart and then matching off of first and last name. There is an option in VLOOKUP to go to the next higher match. That would work if the names were like:
Brown, Jean Paul
Brown, Jean
And if you were always looking using the smaller name toward a sheet with the longer name. You would probably get more matches than you have initally. What you are trying to do is reeally better suited for being completed with a programming language like Perl or Python. The allow you to split strings into individual words and compare the different parts. Excel is a spreadsheet with some database qualities and you could use it to split the names apart and compare them but what you really need to do is fix the input into the two files so that they use the same data formats or have a common id between them.
The other thing you are going to have to deal with is should Jon Smith match Jonathan Smith and things like that are going to take either a human to evaluate all of the parameters and decide, or be coded into a fairly complex program that takes into account all possibilities.
…Hello,
You could use either vlookup or hlookup to fill the value in from the other table. Based on the information you provided you would need to use vlookup. VLOOKUP Searches for a value in the top row of a table or an array of values, and then returns a value in the same column from a row you specify in the table or array. Use HLOOKUP when your comparison values are located in a row across the top of a table of data, and you want to look down a specified number of rows. Use VLOOKUP when your comparison values are located in a column to the left of the data you want to find.
You can use the VLOOKUP function to search the first column of a range of cells, and then return a value from any cell on the same row of the range. For example, suppose that you have a list of employees contained in the range A2:C10. The employees' ID numbers are stored in the first column of the range or Column A and start on Row 2 (Normally Row 1 contains the headers like ID, Name , Locallity, Status). If you know the ID number, you can use the VLOOKUP function to return either the department or the name of that employee.
Your best bet is to check the help section of the version of excel you are running for specific information. The command syntax can vary a little between versions.
Hello,
Rubberman is correct and what he is trying to tell you is you need the ID fields (first field of each table) to be a key field and built with a unique index (normally also set to auto increment).
The when you join the fields the lookups will use the index and be much faster.
Creating your tables should look something like this:
CREATE TABLE `country` (
`country_id` int(10) NOT NULL auto_increment,
`language` varchar(25) default NULL,
`country_name` varchar(25) default NULL,
PRIMARY KEY (`ID`)
);
Hello
Your missing a few things in your crontab file. Simply placing the file in /etc/cron.hourly is not enough. The format of an entry in a crontab file is like this sample file. Lines that start with a # are comments and ignored by cron:
# use /bin/sh to run commands, overriding the default set by cron
SHELL=/bin/sh
# mail any output to `paul', no matter whose crontab this is
MAILTO=paul
#
# run five minutes after midnight, every day
5 0 * * * $HOME/bin/daily.job >> $HOME/tmp/out 2>&1
# run at 2:15pm on the first of every month -- output mailed to paul
15 14 1 * * $HOME/bin/monthly
# run at 10 pm on weekdays, annoy Joe
0 22 * * 1-5 mail -s "It's 10pm" joe%Joe,%%Where are your kids?%
23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday"
5 4 * * sun echo "run at 5 after 4 every sunday"
The easiest way to create a crontab file is while logged in to a shell as garrett type the following:
crontab -e
To see your crontab use:
crontab -l
To remove the current crontab for the user:
crontab -r
Hope this helps.
Hello,
Since you mention cron I am assuming a Linux system. You have to remember that cron does not work like a normal user. You have to provide the absolute path of the files you want to run and set variables to allow it to run. If you are tring to run a php script from cron here is a site that covers several ways to execute the script:
http://www.thegeekstuff.com/2011/07/php-cron-job/
Hello,
How about giving us a little more information.
Does the fan in the power supply come on?
Do you hear any beep codes?
How do you know the RAM is working?
Hello,
This is a know issue with Mint. You need to install the gnome-screensaver and add it to gnome-session-properties.