I have been searching all over the web, i could only found the inettuts-with-cookies, which teach how to use Jquery to perform drag and drop and then save in cookies. Can anyone please show me how to save to database (php and mysql)? I need it badly..
EDIT:
First, I am not php beginner, but a AJAX beginner. Those tutorials are only fo...
Is there a built-in function in PHP or MySQL that will provide the total number of MySQL queries used on a page? I've seen on a lot of sites (mainly forums) they have a message at the bottom saying something like "Page generated in 0.6 seconds with 20 queries".
If there's nothing built in then I'll add something to my database class to ...
Hi,
I am planning to use MYSQL. Is there a connection pooling extension available. or what is the normal practice for connection.
is this the one used in every where...
mysqli_connect("localhost", "xxx", "xxx", "test");
Do people use just normal msql_connect or pconnect..? how better is pconnect and what setting should I do for PConnec...
I need to implement login velocity checking for a web service. The service is in ruby and the database is MySql.
I can imagine bad ways to do this. For example, have a table that stores every login attempt's time and whether or not it was successful, and every time the user tries to log in, query that table for the last n login attemp...
I have two tables: "user" -> "order"
TABLE: user
user_id
-----------
u1
u2
TABLE: order
order_id | user_id | flag
-------------------------
o1 | u1 | fA
o2 | u2 | fB
Y need obtain all users counting how many times have orders with flag 'fA'
RESULTS WHAT I NEED:
user_id | orders
----------------
...
It would seem these days that everyone just goes with MySQL because that's just what everyone goes with. I'm working on a web application that will be handling a large quantity of incoming data and am wondering if I should "just go with MySQL" or if I should take a look at other open-source databases or even commercial databases?
Thanks...
Hello,
I have a stored procedure that makes very complex joins and returns 1 row of data (LIMIT 1 is used). In my application I then use that data to make some calculations. This way I try to keep business logic out of stored procedures.
But now I need to get that data in another stored function to also make some calculations. The reaso...
I am trying to join two tables; the purpose being able to search and display event information for an artist that is entered by the user.
The tables are as follows:
artist table:
[id],[name]
events table:
[id],[artist_id],[venue_name],[city],[state],[date],[time]
I created a search engine, but what I want to do is when an artist name...
Hello,
I found following table structures while I was watching ruby on rails tutorial.
table actors
id int 11 primary key auto_increment
name varchar 30
table movies
id int 11 primary key auto_increment
name varchar 30
table actors_movies
actor_id int 11
movie_id int 11
how to I make a query to select movies that an a...
Lately I've been favoring using named pipes (option --enable-named-pipes) in MySQL running on windows, and connect via the .NET connector driver. It's often recommended for security purposes, but one thing it allows me to do is connect with "." as the connection string and develop on my PC and deploy to the server without having to chan...
I have the following method which is used to populate a DAO from the database. It performs 3 reads - one for the primary object, and 2 for some translations.
public bool read(string id, MySqlConnection c)
{
MySqlCommand m = new MySqlCommand(readCommand);
m.Parameters.Add(new MySqlParameter("@param1", id));
m.Connection = c;
...
Hello,
I want to display "tips" on my page that changes every say 30 seconds. The results from the "find" method in rails is not ordered by ID. It will be ordered by another column.
What is the best way fetch "next" value. Is there a way to get number of row in result set and then find by next row id?
Thanks,
Tam
...
Hi, I've been stuck with this issue for days, which is something like calculating the numbers of weeks that lies between two days, for example:
Select @Days = (datediff( week, @pdtFromDate, @pdtToDate) - 1) * 5
This returns the output as 257.
I need to convert this script into MySQL.
Any suggestions?
...
What is the best way to store a file structure, along with files, say from a Zip file? Currently each file is a row in the MySQL database, but obviously no structure can be read from that. I want to avoid storing a binary file. All files should be plain text. Each zip/file structure is private to the user whom submitted it.
...
Hi,
I have a table with several fields and one field having 3 Comma Separated Values
Column 1 Column 2
1 1,2,3
2 2,3,4
3 6,7,8
Now i want to run an SQL query which fetches me the rows which have the value i send as an input.
Like in the above example, if i send a value 2 as an input to the function...
Duplicate:
website screenshots using php
Is it possible to take a screenshot of the current page using PHP?
...
I have two dynamic tables (tabx and taby) which are created and maintained through a php interface where columns can be added, deleted, renamed etc.
I want to read all columns simulataneously from the two tables like so;-
select * from tabx,taby where ... ;
I want to be able to tell from the result of the query whether each column came...
Is it possible to do a select in an IF statement in ON DUPLICATE KEY UPDATE?
Lets say I want to setup shipping rates by zip code, and in case of duplicate zip code entered, I want to apply the highest rate to apply.
My database has a table of shipping rates and a table of zip codes. The zip code table has a foreign key referencing th...
I have a table with 2.4M+ rows, and no indexes. I am 100% sure all the rows have one column (we'll call this id) that is unique, it is of type VARCHAR(255).
I now have a file of approximately 10,000 id's and need to pull the entire row for each.
Is using IN(...) my best option? Should I add an index?
I was thinking for some thinking o...
Hello,
I am tracking page views within modules using the following table:
id | page_id | user_id | session_id | created
Every page is unique to a certain module; so page 14 only exists in module 2, for instance.
I am trying to write a query that tells me when a viewing session began (GROUP BY session_id) for a particular module, but...