Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




Domain Name Now Doesnt Work


I have a software script I had installed on my server that works with a mysql database. It was working fine as far as pulling information from the database under my old domain name, however, I changed to a new domain name as primary on my server and now the database does not pull anything into the template.

I know this is probably simple but not sure how to fix this.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Subselect Doesnt Work
i am trying to remove values from a list menu if the join table
doesnt have keys when a key is selected for instance:
locations
locationID

locations_join
locationID shotlistID

SELECT SQL_NO_CACHE l.locationID , l.location FROM locations l LEFT JOIN
locations_join lj ON l.locationID = lj.locationID WHERE l.locationID NOT IN
(select locationID FROM locations_join WHERE shotlistID IN (5069)) ORDER BY
l.location ASC

so when shotlistID is selected all the keys from the locations_join joined
to the shotlistID would be remove from the locations list please help, i'm
trying to do this in one query saving from getting all the keys into an
array then checking if the values arent in the array when generating the
list.

GROUP BY Doesnt Work
i have a table that contains the folowing fields:

some_table:

company_number
something_number
price
date_price_established

for a certain company i need to get all the dates that prices were established. and i dont want any date_price_established to repeat themselfs.

for example, for the following database:

1,1,15.5,1.1.2006
1,1,16,1.1.2006
1,1,17.5,1.1.2006
1,1,16,3.1.2006

the results will be : 1.1.2006, 3.1.2006.

this is what i've tried:

SELECT date_price_established
FROM myDb.some_table
WHERE company_number = 1
GROUP BY date_price_established";

Where Clause Doesnt Work
im creating a website with a mysql database. ive jus got started. im havin a few problems
i have a product table and i execute a simple query but it doesnt seem to give me any results: heres the query:

Select * from product where ProductName = 'Age of Empires III';

the above query doesnt work but this 1 does
Select * from product where ProductName LIKE 'Age%';

Subselect Doesnt Work
i am trying to remove values from a list menu if the join table d=
oesnt have keys when a key is selected for instance:
locations
locationID

locations_join
locationID shotlistID

SELECT SQL_NO_CACHE l.locationID , l.location FROM locations l LEFT JOIN lo=
cations_join lj ON l.locationID =3D lj.locationID WHERE l.locationID NOT IN=
(select locationID FROM locations_join WHERE shotlistID IN (5069)) ORDER B=
Y l.location ASC

so when shotlistID is selected all the keys from the locations_join joined =
to the shotlistID would be remove from the locations list please help, i'm =
trying to do this in one query saving from getting all the keys into an arr=
ay then checking if the values arent in the array when generating the list.

Function Doesnt Work
i tried write simple function:

CREATE FUNCTION `getLastNumber`(some_guy INT(50), date DATE) RETURNS float
BEGIN
DECLARE a FLOAT;

SET a = NULL;

SELECT number INTO a FROM numbers p WHERE p.number_owner = some_guy AND p.date_created <= date ORDER BY p.date DESC LIMIT 1;

RETURN a;
END

that would return last inserted number into table for some person. When some_guy has number in table, then is everything ok and it returns last number, but when some_guy does not have row in table it returns: Query OK, -1 rows affected. Pls why? and how to fix it?

Mysqldump Doesnt Work
i try to insert the followind data to mysql database
mysqlimport -u root -p anaktisi2 < phpbb_db_backup.sql

But this doesnt insert anything in the db.

Subselect Doesnt Work
i am trying to remove values from a list menu if the join table d=
oesnt have keys when a key is selected for instance:
locations
locationID

locations_join
locationID shotlistID

SELECT SQL_NO_CACHE l.locationID , l.location FROM locations l LEFT JOIN lo=
cations_join lj ON l.locationID =3D lj.locationID WHERE l.locationID NOT IN=
(select locationID FROM locations_join WHERE shotlistID IN (5069)) ORDER B=
Y l.location ASC

so when shotlistID is selected all the keys from the locations_join joined =
to the shotlistID would be remove from the locations list please help, i'm =
trying to do this in one query saving from getting all the keys into an arr=
ay then checking if the values arent in the array when generating the list.


Why Doesnt Limit Work Fully
Why is it, when you have a query, and you limit something, it doesntlimit the records searched? such as, i have a query that searches for "joe" and puts it in ASC order and limit 5, itll go through all joe's, is limit only good for displaying records, such as only 5 records show, ? if that made any sense :)

Full Text Searsh Doesnt Work
I am trying to do a Full text search, but I have two problems.

1. If I enter a word that is found under multiple entries, I get no return. But it i search a word tha's only under one enetry, then it works.

2. This query works:
PHP

SELECT * FROM `site` WHERE MATCH (site_name,keywords) AGAINST ('mice') AND `approved`=&#391;'

, but when I add WITH QUERY EXPANSION, it doesnt work.

PHP

SELECT * FROM `site` WHERE MATCH (site_name,keywords) AGAINST ('mice' WITH QUERY EXPANSION) AND `approved`=&#391;'

I get this error:


MySQL said:

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WITH QUERY EXPANSION ) AND `approved` = &#391;'
LIMIT 0, 30' at

Making This.domain.com Be The Same As Domain.com/this
this.domain.com be the same as domain.com/this ?


It Doesnt Use My Index!
`player_1` mediumint(7) unsigned NOT NULL default &#390;'
`player_2` mediumint(7) unsigned NOT NULL default &#390;'
reffering to users' id-number in another table.

I have two indexes:

KEY `one` (`player_1`),
KEY `two` (`player_2`)
The cardinality of them is 6000 and 7000. My primary-key has cardinality 150 000.

When i run this query:

EXPLAIN SELECT *
FROM `gamebase`
WHERE player_1 =1
It uses the "one"-key (doh!).

But now, that I run my next query (using OR), it tells me that one and two are possible keys, but it uses neither, but loops through my entire table "Using where".

EXPLAIN SELECT *
FROM `gamebase`
WHERE player_1 =1
OR player_2 =1

WHERE Doesnt Equal
I am trying to select something my DB where a clause does not equal something but for some reason I cant seem to make it work.

Here is what I have tried.

PHP Code:

SELECT * FROM golf_groups WHERE name!="something" 


but this doesnt seem to work. i had done something like this before and thought that I had done it this way, but since this does not work,

Its Returning A Value That Doesnt Exist
Okay here is the deal. I am running a query to find out if there is an ID in my table that has a case number that matches the one being submitted. If there isnt once its should step into an if statement that would submit a number of records. Otherwise it should jump to the else statement.

I the problem comes from: the query keeps returning "Record id#2" but there is no record matching the case number being submited from the form.

if( isset($_POST['Submit'])){ //Begin If statement logic
$resultcheck = mysql_query("SELECT * FROM submissions WHERE wfmcase = " . $_POST['wfmc']) or die(mysql_error()); //Query string to test if wfmcase was already submitted
echo "Sucess, form varibles have been passed.<br />";
echo "Resultcheck query results: $resultcheck <br />";

if ($resultcheck == ""){ //Checks to see if the query was empty.
echo "There are no duplicate case escalations pending. <br />";

I added the echo statement so that i could see how far it was getting through the script. It dies after printing the varible $resultcheck which gives "Record id#2". It never enters the 2nd if statement because for what ever reason the query has the "record #id2" in it... What is causing this? I have verfied that there is no case that matches the one coming from the form and i get the same error.

Can I Have My Db On Different Domain
I've goto migrate a website to a new server, is there anyway (in the connection string) that i can continue to reference the old server (which houses mysql) and have the website on the new server and then be able to switch the connections strings when we are happy with the migration and we don't lose that much data.

Sub Domain
I have a sub domain where my script is running.How would I access the database?

My Domain Name
I've been trying to get MySQL to work for the last week. I've tried looking all over the web but nothing seems to work.My domain name links to a directory on my home computer.
I'm running Windows with Apache, PHP, and now MySQL. Apache and PHP work fine and I can connect to MySQL on localhost, but when I try to connect to (my domain name) it keeps giving me the "can't connect on 10061" error. I'm entering "mysql -h (my domain name) -u guest -p". I made a user named guest and as I said, can connect if I use "mysql -h localhost -u guest -p." mysqld.exe is running as a service. Window's firewall is disabled. Can't connect using mysql_connect in PHP either.

Copying Db From One Domain To Another.
I have 50 domains which each of these reside on the same host. Each domain is state specific. I have set up one site the way I want using the control panel of the website which I assume writes the data to a database to be extracted later via PHP. 

Well setting this up is a lengthy process and I thought that instead of manually configuring through control panel I could copy the db I already have configured to the other domains then just change the state references... make hours into minutes this way.

Removing A Domain
I added a new domain but by mistake i inserted an incorect username from what the client wants. how can i change it, or remove the user and redo it.

Domain Propagation
Has anyone noticed that new domain names only take a few hours to be active. ? last year it took 48 hours .

Store DB For Each Domain
if there is a way to set up MySQL server to keep DB's for one user in it's home folder?

I wonder how those virtual (shared) hosting companies set it up?

What I mean is say if I have two users (domains) on the server they will have all their files in their home folders.

/home/domain1.com/
/home/domain2.com/

I ask this because I find it neat to have all the files for one domain in one place - mostly for backup.

Mysql Db On Another Domain
www.domain1.com has a script that saves the last login
of users. the script needs to save to a mysql DB on another
domain's DB table (www.domain2.com - MySQL DB).
Password and user for domain2 DB is provided.
is it possible to connect/save data to a mysql db on another domain

Virtual Domain
I have a dedicated server with 5 virtual domains under iis.
i just installed mysql. how do i create a separate instance of mysql for
each of my virtual domain so that one domain affects only tables created by
that domain and not step on tables of other domain?
let's say that each virtual domain is a separate web site with different
fqdn

Domain Values
I have table which has a column called URL, in which different formats of urls are stored.
I want to read hostname, www.domain.com, from url column and strip out remaining data.
I was reading regexp manual and i think it cannot be use before WHERE clause e.g

select url regexp '' from table
but at the same time i saw this functionality on another website so it is doable.

Using MySQL/PHP On Someone's Domain.
You know if you wanna connect to mysql through php in the localhost you just do:

$db = mysql_connect("localhost", "user", "password");
mysql_select_db("database", $db);

Now.. what if I wanna put.. lets say the database on a web space I got from my ISP.

Questions are:

Which files do I need to put on the webspace?
How do I connect to it?
Do I need to do anything first?

Mysqld &amp; NT Domain Authorization
Does anybody know if it possible to start mysqld.exe having NY domain credentials.

Something like:

mysqld.exe --user NT_doman_user --pass NT_domain_pass

Mysql To Virtual Domain
I have a dedicated server with 5 virtual domains under iis.

i just installed mysql. how do i create a separate instance of mysql for
each of my virtual domain so that one domain affects only tables created by
that domain and not step on tables of other domain?

let's say that each virtual domain is a separate web site with different
fqdn

Regexp Matching *.domain.com
I don't think this is possible, but perhaps it's just beyond me?
I have a database of domain names.

other1.com
*.test.test.com
test.com
*.other2.com

How can I validate domain name search like
"test.com" = valid domain
"other.test.com" = invalid domain
"other.test.test.com" = valid domain


Here's my attempt, but i'm not even close.

SELECT * FROM `dns` WHERE `DNS_Lookup` REGEXP ^([^.asterisk.])([.period.])(".$_DNS_SEARCH.")$';";

Configuring XAMPP In The Domain
I am installing my XAMPP in my pc.

It works fine. Everything works. My question is, is it possible to install XAMPP inside in my domain e.g., www.mydomain.com/xampp. Please help me to configure it using the domain, not in the localhost.

Storage Of Domain Names
I'd like allow user to enter domain names in a form and then to store these in a table field in MySQL.Googled this bigtime butdidn't find anything on it. What I would need is the regex poliching of the domain names (I guess I cannot put slashes into the database without caution, right?

Query For Attribute Type/domain
How can I find out the type of an attribute through a SQL query. For instance, if I have a table and one of it's fields/attributes/columns/whatever is "name" and is of type "tinytext" how can I, through a SQL query (such as mysql_query() in php) get "tinytext".

Select Distinct Domain Name From An Email Field?
Is it possible to select distinct domain names from an email field in a table in a single statement, extracting the domain after the token '@'?

User@localhost And User@domain.com
I have been following a tutorial for a mail server which uses mysql, mainly postfix

all through the tutorial i have been asked to put a user and password in the files for the database..

which i have done

root and pass1

in the log files the error shows as

warning access denied for user root@domain.com ( using password : yes )

when i log on from the shell, to mysql

and purpously get the password wrong, I get
access denied for user root@localhost ( using password : no )

i have checked the password is correct..

is the part after the @ the issue, and how can i tell mysql that root@domainname.com is a valid user???

How Does Sql Work Exactly?
Well what exactly does sql do when you create a table for like a login (user) What does the tables and stuff do. Do they just create like a library to store that users information so they can log back in to site or w/e....

Bug Work
I've got this bug http://bugs.mysql.com/bug.php?id=27861. I know they've made a fix and it's going to come out in the next version but is there any way I can fix this myself?

SET NULL Doesn't Work
I have this table:
MySQL
CREATE TABLE `users` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `login` VARCHAR(20) NOT NULL,
  `password` VARCHAR(20) NOT NULL,
  `name` VARCHAR(30) NOT NULL,
  `email` VARCHAR(30) NOT NULL,
  `icq` INT(9) UNSIGNED DEFAULT NULL,
  `personal_stream_id` INT(11) NOT NULL,
  `TIME` DATETIME NOT NULL,
  `url_name` VARCHAR(30) DEFAULT NULL,
  `avatar` VARCHAR(20) DEFAULT NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `id` (`id`),
  UNIQUE KEY `login` (`login`),
  UNIQUE KEY `email` (`email`),
  UNIQUE KEY `icq` (`icq`),
  CONSTRAINT `users_fk` FOREIGN KEY (`id`) REFERENCES `photos` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=INNODB DEFAULT CHARSET=latin1;

The constraint is linking this table:


MySQL
CREATE TABLE `photos` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(20) NOT NULL,
  `user_id` INT(11) DEFAULT NULL,
  `streams_id` INT(11) NOT NULL,
  `description` TEXT,
  `hardware_id` INT(11) DEFAULT NULL,
  `ratings_id` INT(11) DEFAULT NULL,
  `thread_id` INT(11) DEFAULT NULL,
  `url_name` VARCHAR(20) DEFAULT NULL,
  `views` INT(11) DEFAULT NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `ratings_id` (`ratings_id`),
  KEY `user_id` (`user_id`),
  KEY `streams_id` (`streams_id`)
) ENGINE=INNODB DEFAULT CHARSET=latin1;

It works, but as you can see, the constraint ondelete action is set to CASCADE, which is not good - it is bad to delete all photos when the user is deleted, I want the database to set user_id value to NULL using the SET NULL action - PHP frontend should display something like "User deleted" then. But when I try to alter the constraint to SET NULL, EMS SQL Manager I'm using shows a very strange error like "Can't create table '.dfk#sql-8e4_4.frm' (errno: 150)". Similiar error is shown when I try to link unsigned int with not unsigned int.



What Query Would Work For This?
I have two tables: say Yes and No.

Yes(ID, YesEmail, EmailOwner);
No(ID, NoEmail);

Both YesEmail and NoEmail contain email addresses.

What query can retrieve all the email addresses in Yes table that are not listed in No table? Thanks in advance.

Why Does This Work In PhpMyAdmin But Not In PHP?
This is driving me absolutely crazy. I am using the following query which works fine in phpMyAdmin in the SQL section

SELECT date, amount, description FROM invoices WHERE unique_key = 48781048
when I enter it like this in PHP it comes up with the error below

$query = "SELECT date, amount, description FROM invoices WHERE unique_key = 48781048";
$result = mysql_query($query) or die (mysql_error());
Unknown column 'unique_key' in 'where clause'

I've even tried using the PHP code that phpMyAdmin generates and that doesn't even work.

How Does 'query_buffer_size' Work In 3.23.56
I see a variable named 'query_buffer_size' that value is 0 in mysql server 3.23.56. I didn't find relational materials in reference. so I wander if any one could tell me what is this variable for?

Min Max Does Not Work For Me For Timestamp
I have such a table:

id
timestamp
value
person

regardless or entering this
SELECT id, MIN(timestamp),value FROM table GROUP BY person

or this

SELECT id, MAX(timestamp),value FROM table GROUP BY person

The timestamp value may be properly pulled, yet, the value field is always the same. Meaning, not the value associated wuth the MIN or MAX timestamp value is shown, but the very first for that person. How is that possible?

Cannot Get 3 Where Statement To Work
I am having a problem with MySQL 5. I cannot get 3 where statements to work with my database. Any two of the three work fine and return records as they are supposed to but when I add a third clause (all clauses are AND) I get absolutely no records at all and no error message. I don't understand what could be causing this and can use any help offered.

SELECT this, that, otherthing FROM myTable WHERE something = "this" AND somethingelse = "that" AND yetsomethingelse > 0 ORDER BY RAND() LIMIT 3;

LOAD_FILE Doesn't Work
I try to load a file into the SQL DB, using load_file() function. But this doesn't work.

Database definition:
Field      Type       Attributes Null Default
ID         int(8)                No  
server_id  int(4)                Yes  NULL                
date       date                  Yes  NULL                
inventtext longblob   BINARY     Yes  NULL                

SQLcommand:
mysql> insert into inventory values('', '858', '2008-01-16', LOAD_FILE("/import/tv.20080116"));

The file has the following security settings:
-rwxrwxrwx tv.20080116   (116 KB)

When I execute the command I don't get an error, but are filled like this:
  ID  server_id  date       inventtext  
 242  858        2008-01-16 [BLOB - NULL]

Getting PHP &amp; MySQL To Work Together
I am trying to get PHP to write into MySQL database. Right now it does not seem that it is doing such, MySQL doesnt appear when I bring up the PHPInfo() page. I have removed semi-colons before the Mysql.dll extension in php.ini, and I have made sure that PHP is in the windows PATH. What else do I need to do to get this stuff running?

Auto_Increment Doesn't Work Any More!
After upgrading from 5.0.11.beta to 5.0.15 on a Windows 32 system, I can't use the auto_increment feature any more; for example, phpMyAdmin gives the following error message: "#1366 - Incorrect integer value: '' for column 'ID' at row 1". Other php clients also (WordPress, MediaWiki...) don't work.

Now() Date Doesn't Seem To Work!!
I am using Now() to insert the current date into my date field and everytime it inserts the following value .... 0000-00-00

WHERE EXISTS Does Not Work.
SELECT id,name FROM tcesports_groups WHERE EXISTS (SELECT * FROM tcesports_teams WHERE tcesports_teams.gid=tcesports_groups.id);

i get this:

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXISTS (SELECT * FROM tcesports_teams WHERE tcesports_teams.gid

Strucuture of the both tables:
tcesports_teams
-------------------
gid smallint(6)
img varchar(100)
mod mediumint(9)
pos smallint(6)

tcesports_groups
-------------------
id smallint(5)
name varchar(100)

currently the entries for id or gid are just 2digits long (1-99) so im a bit confused what throws this error. im using mysql 4.0 branch

Logging Doesn't Work
I have WinXP, and MySQL 5.0.18 running as a service. I followed the instructions for
setting up general query log file (mysqld --log), and the file was created (Nebo.log),
but it does not display any logs.
This is all I have after executing a few queries:

Nebo.log

mysqld, Version: 5.0.18-log. started with:
Tcp port: 3306 Unix socket: (null)
Time Id Command Argument

Can anyone offer any help?

Date() Just Won't Work
I have this line

while ($qry = mysql_fetch_array($results)) {
// if (strtotime($qry['loginDateTime']) <= (time() + 86400*31)) {
$login .= 'Name: '.$qry["FirstName"].' '.$qry["LastName"].' ('.$qry["JoinDate"]?date("d/m/Y", strtotime($qry["JoinDate"])).') '.$qry["Email"].''.$qry["rep_NBR"].' ('.$qry["State"].')
';
//}
}

And when I run it I receive

[quoteParse error: parse error, unexpected ';' in e:emailMembersPending.php on line 43[/quote]

Mysql 5 Help Doesn't Work
when i type "help show;" in mysql 5, nothing shows up. Why can i not see it.?

Won't Work On Server!
here's the error:

DBD::mysql::st execute failed: Table 'garcia22_ccc.offers' doesn't exist at index.pl line 1257.
DBD::mysql::st fetchrow_array failed: fetch() without execute() at index.pl line 1266.


Copyright © 2005-08 www.BigResource.com, All rights reserved