I have to make connection to the DB and Insert a row based on the data that the SWF sent me...
I will need to make it so that the SWF->PHP part is secure by not letting users tamper with data.
I don't want to use SSL because its not a suitable solution... what other method is available?
...
I have around 300 records in some table in mysql database. And I have a requirement to fetch 40 random records with one query. How to write the query?
need help
thanks.
...
I have two tables: Users and Friendships.
The actions I have in the website are:
Register
Log in
Select friends/people from users table
Add people as friends
There are a little more actions but in general i wanted to know :
The Question:
Should I use InnoDB or MyISAM for the tables ?
( Or InnoDB for one and MyISAM for the other ? ...
I'm creating a web application wherein users should be able to specify their weekly schedule. Here's my DB model for that:
id
user_id
day
from
to
day is an enum of 0-6 (0 for Sunday, 1 for Monday, and so on). from and to represent minutes from midnight. So, 0 means midnight, 1 means 12:01am, 2 means 12:02am, etc.
Is this a good desig...
What would be the best sql to get data out from the table below as follows
Example table
id name buyer amt
1 per disney 10
1 per marie 12
1 per clarence 11
2 pella Magnus 5
2 pella Olof 2
2 pella Asa 4
3 chris Lotta 6
3 chris Wayne 3
...
I have tables that I've tried setting PK FK relationships on but I want to verify this. How can I show the PK/FK restraints? I saw this manual page, but it does not show examples and my google search was fruitless also. My database is credentialing1 and my constrained tables are practices and cred_insurances.
...
The only way I know is show create table MyTable
...
How do you detect the last record in a result set when using php and mysql. In ASP its EOF (End of File). Whats the php/mysql equivalent? I'd like to know the last record so i can draw a line after it or close a tag or anything else.
...
Many people say that I should create a friendships table(userid , friendid).
My question is:
Won't there be a double record for every friendship ? like:
12 is friend with 5
+
5 is friend with 12
Is there a way to prevent this ?
| OR |
Should I just ignore that ?
...
$foot = mysql_query("SELECT count(*)
FROM tblQA
WHERE intResponseID = ''
AND cCategory = 'Football' as qcount,
(SELECT max(dPostDateTime)
FROM tblQA
WHERE intResponseID = ''
...
This might be related to another problem i am having. But in this case my app was idling and i had a crash in my GetConnection() on conn.open().
Since i was idling i figure it had comething to do with my queue in the background and possibly garbage collection? I took a look at netstat and found 16 connections.
Does mysql only accept 16...
Essentially, I have a methods that manipulates data taken from a table to create a new object "ZExpert." ZExpert has parameters int id, int domain, and double ZExpert. I have added a column to the table I took the data from called "Z_Expert_Score."
I want to put the double ZExpert score from the object in the column Z_Expert_Score, in ...
Hi,
Im stuck with this and need some help.
SELECT COUNT(id) AS counter
FROM time_reporter
WHERE user_id='$user_id'
AND actual_date = '$date'
AND ((start_time > '$start_time' AND end_time < '$end_time'))
It checks ok if in range but i need to make sure if there is a record start , end time so next record could not be i...
How can I combine those two queries into one?
1) This finds the japanese sign for dog (犬):
SELECT japanese
FROM edict
WHERE english LIKE 'dog'
LIMIT 1;
2) This finds all japanese words with the sign for 'dog' (犬) in it:
SELECT japanese
FROM edict
WHERE japanese LIKE '%犬%';
3) I am having trouble combining those two i...
Ok, So I have a table called 'auctions' and each auction has a 'product_id' associated.
The auctions table may have 500 items with repeated products.
I want to order by auction_id asc (so newer auctions are shown first), but also only show distinct products. Using distinct doesn't work, and when I group by the product_id, it doesn't o...
Error
SQL query:
--
-- Database: `work`
--
-- --------------------------------------------------------
--
-- Table structure for table `administrators`
--
CREATE TABLE IF NOT EXISTS `administrators` (
`user_id` varchar( 30 ) NOT NULL ,
`password` varchar( 30 ) NOT NULL ) ENGINE = InnoDB DEFAULT CHARSET = latin1;
MySQL said:
#1046...
Just example of xml file will be enough)
OR
Can Hibernate load needed entity(all records) at the starting of application and store it in memory for quick access?
...
I have a column of data in a table (1) which I have to check against the column of data in several hundred (or thousand) other tables.
Would it be faster to do this as a mysql query intersecting both tables, or to get the data from table (1) into an array, and then set the other columns of data as arrays and intersect?
It's MySQL and P...
I have a database which stores the
username
score
timestamp (i use the Unix time() function)
Whenever user does a specific task the score is increased and corresponding time stamp updated.
I want to retrieve the score board with usernames and scores.Ordering the scores with respect to the scores is easy (iam using ORDER BY score...
I have a simple model that when I try to save, I can see this exception in the PyDev output while debugging my Django app.
I've confirmed all fields are being set to their proper values (this is a model with 5 charfield/integer properties). I've stepped through in eclipse to the line that is calling .save(), which is where the exception...