I am trying to establish a very simple connection to mysql db and i keep getting this
error:Warning: mysql_connect(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) ...
However, mysqladmin does manage to connect to the db, and also I am using Java EE with entities which I also managed to connect to...
ok im makeing a simple database for my example, there is users data and the user company's data .
CREATE TABLE `users` (
`UID` INT(25) NOT NULL AUTO_INCREMENT ,
`username` VARCHAR(60) NOT NULL ,
`password` VARCHAR(100) NOT NULL ,
`ownername` VARCHAR(150) NOT NULL ,
`userstatus` TINYINT(1) NOT NULL ,
`userregistertime` DATETI...
Hi, in the backend a user can select a country via dropdown menu, e.g. "Germany". The frontend is bilingual so i have to dump "Germany" if language A is set and "Deutschland" if language B is set.
How can i save the selection and its translation to separate fields in the database?
Thank you for any help!
...
Hi All,
I am using symfony1.1. In my app I am required to upload some image files through admin and store their content as blob in DB.
Here's how I am doing it,
1. Getting the fopen handle on the uploaded file.
2. Pass this to stream_get_contents($handle);
3. Store the content in as blob.
Everything works fine on WinXP, but on live se...
Hi Intellects,
I've two tables :
table_1 - ControlID, Code,
ReportedDate, FiledDate Age,
AgeCategory, etc.,
table_2 - ControlID, Code,
ReportedDate, FiledDate etc.,
ControlID in table_1 is Foreign key whereas not in table_2. I need to update ReportedDate in table_1 with ReportedDate in table_2 and Age and AgeCatogory ha...
Hi all, Currently I am using statement.executeQuery(qStr) in java to select a large amount of data from mysql. Unfortunatly, java keeps running out of memory at the statement.executeQuery(qStr) statement with exception java.lang.OutOfMemoryError: Java heap space. I am wondering if there is a method to stream load data from mysql. So that...
What I am looking into is:-
I do have a search page say index page. and the action file is search.php. when I fire a query search.php will start processing on what I searched.
structure of search.php
it uses $_GET function to retrieve query from index page.
first it will search in MySQL database.
IF yes then display the result from ...
Hi All,
I have researching NoSQL for a while, but I am still struggling to wrap my head around searching and filtering results/documents.
In a NoSQL world, how would I find all data within two timestamps for example? If everything is stored on a key/value basis? Or find all documents within a radius of a latitude and longitude point?
...
Hi guys! It's my first time with Sesame 2 so please be kind. It could be a stupid question but I can't find documentation about how to use Sesame 2 and a mysql store.
I've created one using the create mysql.
command in the Open-rdf console but now I do not know how to use it in Java. The official documentation presents some example but i...
$GetUid = $dbConnect->prepare("SELECT UID FROM users WHERE username = :username");
$GetUid->execute($RegisterData3);
$UserID = $GetUid->fetch();
why does it return array not a string ?
var_dump('$UserID') says
array
'UID' => string '45' (length=2)
0 => string '45' (length=2)
it should be
array
'UID' => string '45' (length=2)...
I have a MySQL table titled 'my_cal' with a column titled 'start_time' for particular events in the calendar.
The way items are added to the database, there are no overlapping events.
There also may not be an event for a particular day/time either, in this case we leave it blank or put a blank value.
My problem lies in the fact that ...
Hi i have a table with 2 dates the ADDDATE and UPDATEDATE
When add an item the ADDDATE is the current date and the UPDATEDATE is 0000-00-00
i need to ORDER BY the sql command and get the best date of those 2
For example if ADD=12/1/2010 and UPDATE=30/6/2010
the UPDATE DATE is best (newest)
Any help or reading appreciated
...
Hello everyone,
I have a PHP page where a user can select a month and then an html label and selection box will generate for each day of the month:
<?php $i=1; while($i <= $daysInMonth){?>
<table align="center" style="width: 435px">
<tr>
<td class="style1"><p><label id="Label1"><?php echo($month.' '.$i); ?></lab...
I have been trying to connect to my database using pdo on godaddy with no successs.
Initially i got the error:
SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Then i look around the web, found out that i need to change the part to socket. I looked for my socket found it and ch...
Hi,
I have a bunch of northing and easting figures stored in a mysql database.
Is anyone aware of a webservice that will easily allow me to convert a northing and easting to lat / long?
...
Dear all,
I´d love to do something like this, but with a working syntax of course :)
MIN(CASE WHEN col=2
THEN CASE WHEN answer IS NULL THEN 0 ELSE answer END END)
i am trying to prevent a view from getting NULL values and use zeros instead.
Here is my SELECT query that creates the view:
SELECT result,question_id,
MIN(CASE WHEN col...
$select = $this->_db->select()->from($this->_name,array("id","fullname","username","email"))->where("fullname LIKE '$query%'");
I am using this SQL statement currently to power my Ajax auto suggest, if i type in "a" it gets me results starting with a.
I want to know if this can be accomplished my using Zend Lucene indices.
...
Hi There,
I am currently adding a purchase history section to payment system, the system is built in PHP (codeigniter framework) and mysql. The idea of the payment history section is that all the customer purchases are grouped together by date, so in the end the HTML would look similar to this,
My question is I can get the data out o...
That way if I search for the term "mens" the term "gentlemen" will match.
I tried this:
SELECT *
FROM cart_product
WHERE MATCH (
product_name, product_description, product_brand, metal_type, primary_stone, product_type, product_type_sub, product_series, primary_stone_sub
)
AGAINST (
'THESAURUS "english" EXPAND SYNONYM TERM OF "gentlem...
I'm running MySQL 5.1.48 on Windows XP and the following trigger test doesn't work:
-- Drop the old table
DROP TABLE IF EXISTS `ikasan01`.`ikasanwiretap`;
-- Create
CREATE TABLE `ikasan01`.`ikasanwiretap` (
`Id` bigint(20) NOT NULL AUTO_INCREMENT,
`ModuleName` varchar(255) NOT NULL,
`FlowName` varchar(255) NOT NULL,
`ComponentName...