I need to store a data into MySQL. Its length is not fixed, it could be 255 or 2 characters long. Should I use TINYTEXT or VARCHAR in order to save space (speed is irrelevant)?
...
Hi,
I have been working to migrate a non-profit website from a local server (running Windows XP) to a GoDaddy hosting account (running Linux). Most of the pages are written in ColdFusion. Things have gone smoothly, up until this point. There is a flash form within the site (see this page: http://www.preservenet.cornell.edu/employ/submit...
Is it possible to setup ASP.NET MVC 2 to work with a MySQL database?
...
Setup:
mysql> create table t(a integer unsigned,b integer unsigned);
mysql> insert into t(a,b) values (1,2),(1,3),(2,4);
mysql> create index i_t_a on t(a);
mysql> create index i_t_b on t(b);
mysql> explain select * from t where a=1 or b=4;
+----+-------------+-------+------+---------------+------+---------+------+------+-------------+
|...
I couldn't find anything about this in MySQL documentation.
SELECT accesion_id,
definition
FROM accesion_table
WHERE search_word @@ ? OFFSET ? LIMIT Const.MAX_DISP_COUNT;
...
Exporting some data from mysql to a csv file using FasterCSV. I'd like the columns in the outputted CSV to be in the same order as the select statement in my query.
Example:
rows = Data.find(
:all,
:select=>'name, age, height, weight'
)
headers = rows[0].attributes.keys
FasterCSV.generate do |csv|
csv << headers
rows.each do ...
Hi there.
Using mysql and php
Is there any reason / value when checking a password to query the database using the user name and password (after sanitizing, of course) and recording a failed attempt when no rows are returned vs querying the database using the user name and then comparing the return password string?
EDIT: To those who ...
Hi, I want to be able to switch from the current db to multiple dbs though a loop:
$query = mysql_query("SELECT * FROM `linkedin` ORDER BY id", $CON ) or die( mysql_error() );
if( mysql_num_rows( $query ) != 0 ) {
$last_update = time() / 60;
while( $rows = mysql_fetch_array( $query ) ) {
$contacts_db = "NNJN_" . $rows['e...
I want to enable form based authentication by using database as realm but I'm always getting that message whenever I try to authenticate as Tomcat manager in Tomcat 6. I have already created a table user_name and user_roles and mapped the username(blue) to admin and manager as role in user_roles table in mysql, but I'm still unable to au...
Does Triggers in MySQL for Audit Log Slows Down The Main update Insert or delete process?
...
I'm trying to migrate a MySQL DB to SQL Server using MS's SQL Server Import Export Wizard. It isn't going so well... The wizard either tells me that the MySQL syntax is invalid or crashes depending on its mood.
Here is the query that it executes against MySQL before failing:
select * from "_account"
Anyway to change so either MySQL l...
Ok, in this question I learned how to prevent the insert of a NULL value. But, unfortunately, an empty string is being inserted anyway. Apart from preventing this on the PHP side, I'd like to use something like a database constraint to prevent this. Of course a check on the application side is necessary, but I'd like it to be on both sid...
I want to store the current date & time which can be get by System.DateTime.Now in asp.net
but while storing in Mysql it gives Error of Invalid Time.
...
Hi all, i have a mysql table like this
+-----+---------+-----------+-----------------+-------+
| id | item_id | item_type | field_name | data |
+-----+---------+-----------+-----------------+-------+
| 258 | 54 | page | field_interests | 1 |
| 257 | 54 | page | field_interests | 0 |
| 256 | 54 |...
I'm trying to make a search feature that will search multiple columns to find a keyword based match. This query:
SELECT title FROM pages LIKE %$query%;
works only for searching one column, I noticed separating column names with commas results in an error. So is it possible to search multiple columns in mysql?
...
I'm using mysql to create an hotel booking system, but i am struggling a little bit to calculate the final bill.
I need a SELECT command to get data from several tables and make some calculations.
Basically I just need to get the 'night cost' from a table called 'room_types'. Then, use DATEDIFF function to get the difference of days be...
Hi, I'm trying to build a navigation system using categories table with hierarchies. Normally, the table would be defined as follows:
id (int) - Primary key
name (varchar) - Name of the Category
parentid (int) - Parent ID of this Category referenced to same table (Self Join)
But the catch is that I require that a category can be child...
I have a database of users where they can send messages to other users (up to four) and the ID of the message they sent is in their user row.
Name | Email | Msg1 | Msg2 | Msg3 | Msg4
--------+-------------+------+------+------+-----
Pez | [email protected] | 1 | 55 | 42 | 5
Steve | [email protected] | 0 | 0 | 0 | 0...
I need to get the value of a field; I think I am along the right lines but not quite sure this is the proper code. The "Delete Movie" button is where I am trying to get the value of that row like so:
value="'.$row['id'].'"
Can you help?
<?php
//connect to database
mysql_connect($mysql_hostname,$mysql_user,$mysql_password);
@mysql...
Is there any possibility of changing the MySQL DB table's field name or adding a new field in Joomla in any project?
I need this information because I have to apply the Triggers for the tables.. Please Help
...