mysql

something about ansi_nulls

Hi I have a question that we always say that null =null is false ,I want to know that when the ansi_nulls is off this statement which is "null=null" is also false? thanks ...

Problem with Sphinx resultset larger than 16 MB in MySQL

Hello All, I am accessing a large indexed text dataset using sphinxse via MySQL. The size of resultset is on the order of gigabytes. However, I have noticed that MySQL stops the query with following error whenever the dataset is larger than 16MB: 1430 (HY000): There was a problem processing the query on the foreign data source. Data so...

Arbitrary virtual directories from mysql in VSFTP

I am setting up an instance of vsftpd, but the user tables in my system are not just username/password, they also include the user's home directories. Can I set up vsftp to pick up the virtual user's home directory from MySql as well.. or are we strictly limited to authentication? ...

Copying a Table in MySQL and including the Primary Key

I have an ancient code snippet I use for copying tables in MySQL. CREATE TABLE new_table (select * from old_table); This works great, with one exception. It doesn't copy the primary key or other table indexes. Is there any way to copy a table in MySQL AND include the indexes/primary key?? ...

Export MySQL Data as Insert Statements

Hi All, I'm working in Ubuntu with MySql and I also have Query Browser and Administrator installed, I'm not afraid of the command line either if it helps. I want simply to be able to run a query and see a result set but then convert that result set into a series of commands that could be used to create the same rows in a table of an id...

Does the combo of PHP5, MySQL, and a Macbook Pro constitute a LAMP stack? If not, what does?

Hello - I mostly code in Visual Studio, I like it, but lately it's making me feel a little claustrophobic. On my MacBook Pro, I've set up PHP5 and MySQL (natively). With the built-in server on the mac, does this constitute a LAMP stack? Is Mac OSX considered a Linux Environment? I have VMWare Fusion 3, should I set up a Linux OS virtua...

Localization as an afterthought-- screwed?

So I signed on with a startup web development company as a subcontractor. They are putting together a large, complex user/product management system for a company that needs to support multiple levels of hierarchial localization. I signed a 3 month contract, and upon looking at their code, wish I hadn't. They opted to write their own MVC...

about null values!

Hi I have a question that if we declare a variable and then do not set it explicitly to null value then it would be null outomatically ,i mean that the below code will return true or false ? thanks DECLARE @val CHAR(4) If @val = NULL ...

what is "=null" and " IS NULL"

I want some links for reading about the "=null" and "is null" please help me thanks ...

what does "out of range" mean?

Hi I have checked these statements with mysql and no error will happen and also the out put will be 0 rows BUT my friend checked it and he found an error for SELECT becaouse it is out of range !! IS he correct? thanks CREATE TABLE T1(A INTEGER NULL); SELECT * FROM T1; ...

multi-shop orders table and sequential order numbers based on shop

Hey, I am looking at building a shop solution that needs to be scalable. Currently it retrieves 1-2000 orders on average per day across multiple country based shops (e.g. uk, us, de, dk, es etc.) but this order could be 10x this amount in two years. I am looking at either using separate country-shop databases to store the orders table...

what is the out put?

Hi this is my code but when I run it in mysql it will show an error because of datatype but my friend checked it with sql server and it doesn't show error and also insert the value: 32769 .which of them is correct? CREATE TABLE T1 (A INTEGER NOT NULL); INSERT T1 VALUES (32768.5); ...

MySQL query optimization JOIN

Hi, I need your help to optimize those mysql query, both are in my slow query logs. SELECT a.nom, c.id_apps, c.id_commentaire, c.id_utilisateur, c.note_commentaire, u.nom_utilisateur FROM comments AS c LEFT JOIN apps AS a ON c.id_apps = a.id_apps LEFT JOIN users AS u ON c.id_utilisateur = u.id_utilisateur ORDER BY c.date_...

Post and get at the same time in php

Do you have any suggestions with my problem. I need to use get and post at the same time. Get because I need to output what the user has typed. And post because I need to access the mysql database in relation to that input. It looks something like this: <form name="x" method="get" action="x.php"> <input name="year" type="text"> <select...

how should i get ONE row from mysql? ( fetch_array etc? )

I'm pretty sure i'm doing an extra loop here: $q = "SELECT * FROM genres WHERE genre.g_url = '$genre_url' LIMIT 1"; $res = mysql_query($q); while ($r = mysql_fetch_array($res, MYSQL_ASSOC)){ foreach( array_keys($r) as $k ){ $g[$k] = $r[$k]; } } return $g; ...

PHP vs Phpmyadmin

Hi there, I've got this code which i execute on phpmyadmin which works 100% Create Temporary Table Searches ( id int, dt datetime); Create Temporary Table Searches1 ( id int, dt datetime, count int); insert into Searches(id, dt) select a.id, now() from tblSavedSearches a; insert into Searches1(id, dt, count) select b.savedSea...

double left MYSQL join?

I've been trying left joins but as there are 2 joins, i think the problem is the 2nd join roots from table_B not table_A. i am not getting any results where there is the required data in the db. I am not getting a query error the query (simplified) SELECT events.*, ven.*, events_genres.* FROM events LEFT JOIN ven ...

How to search mulitple value seperated by commas in mysql

Hi all, How to search multiple values separated by commas. ex: table name : searchTest id name keyword 1 trophy1 test1,test2,test3 2 trophy2 test2,test5 Points: If i search for test2 both results trophy1 and trophy2 should be display. If i search for trophy1 then trophy1 should be as result. How to solve t...

How to create a table in a particular database?

The create database statement is: CREATE TABLE table_name ( column_name1 data_type, column_name2 data_type, column_name3 data_type, .... ) but, I'm wondering how can I create a table in a specific database? thanks, guys! ...

question with its query

Hi this is my homework and the question is this: List the average balance of customers by city and short zip code (the first five digits of thezip code). Only include customers residing in Washington State (‘WA’). also the Customer table has 5 columns(Name,Family,CustZip,CustCity,CustAVGBal) I wrote the query like below is this correct?...