Hi
I've a SmartGWT application which interacts with a mysql database using rpc services.
Suppose it as a simple form with a textbox & two save & load buttons.
My database & tables & all fields collation is utf8_persian_ci.
All java source files & module html & xml files have saved with utf8 character set. & also I've a meta tag in module...
I used this code to add the data in the mysql table. But I do not know how to separate them because they are only stored in one column:
$birthday = mysql_real_escape_string($_POST['yyyy'] . '-' . $_POST['mm'] . '-' . $_POST['dd']);
How do I load them in here, so that the month, day, and year will be separated:
<tr>
<td><font size="2...
Hello,
I am creating a counter for unique number of visits on a post, so what I have until now is a table for storing data like this;
cvp_post_id | cvp_ip | cvp_user_id
In cases a registered user visits a post, for the first time a record is inserted with cpv_post_id and cvp_user_id, so for his next visit I query the table and if th...
I have an application for scheduling certain events. And all these events must be reviewed after each scheduled time.
So basically we have 3 tables:
items(id, name)
scheduled_items(id, item_id, execute_at - datetime) - item_id column has an index option.
reviewed_items(id, item_id, created_at - datetime) - item_id column has an index ...
Hi, I ve forgot what i set as username and password for mysql database. How could I be able to find it out.I am using wamp server. I am a newbie in mysql and its time to get started for my first project.Please help.
...
Hey! I just want to know your guys opinion on using join tables within the zend framework.
Of course you can use relations by defining a referenceMap and dependentTables and stuff, or using
setIntegrityCheck(false)
within a db select(). The setIntegrityCheck version seems a little bit dirty to me, but the other version is not very s...
I have a table in MySQL that has a primary key:
mysql> desc gifts;
+---------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+-------------+------+-----+---------+-------+
| giftID | int(11) | NO | PRI | NULL | |
| name | v...
Warning this is lenghty! attack if you knowledagble. well at least more then a newb beginner like me.
This script uses three files as detailed below. It is suppoed to create the database and fields from the form input. It gets to the end and shows my_contacts has been created!. But when i go into phpMyadmin the table has not been create...
A table is:
mysql> desc gifts;
+---------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+-------------+------+-----+---------+----------------+
| giftID | int(11) | NO | PRI | NULL | auto_increment |
| name | v...
The following 2 statements are to join using gifts.giftID = sentgifts.giftID:
mysql> select * from gifts, sentgifts using (giftID);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'using
(giftID)' at line 1
and the second one:
m...
Why is the ( ) mandatory in the SQL statement
select * from gifts INNER JOIN sentgifts using (giftID);
? The ( ) usually is for specifying grouping of something. But in this case, are we supposed to be able to use 2 or more field names...? in the example above, it can be all clear that it is 1 field, is it just that the parser i...
Hi,
EDIT: The reason why my Doctrine queries (see below) did not work/produced those errors was because I left out
ci_doctrine.
when creating this database:
CREATE TABLE `ci_doctrine`.`user` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`username` VARCHAR( 255 ) NOT NULL ,
`password` VARCHAR( 255 ) NOT NU...
Usually when looking for some items not showing up in the other table, we can use:
select * from gifts where giftID not in (select giftID from sentgifts);
or
select * from gifts where giftID not in (select distinct giftID from sentgifts);
the second line is with "distinct" added, so that the resulting table is smaller, and probably...
Hay All,
I cant seem to get my head around this dispite the number to examples i read. Basically I have a 2d array and want to insert it into MySQL. The array contains a few strings.
I cant get the following to work...
$value = addslashes(serialize($temp3));//temp3 is my 2d array, do i need to use keys? (i am not at the moment)
$query...
I saw something from an "execution plan" article:
10 rows fetched in 0.0003s (0.7344s)
(the link: http://explainextended.com/2009/09/18/not-in-vs-not-exists-vs-left-join-is-null-mysql/ )
How come there are 2 durations shown? What if I don't have large data set yet. For example, if I have only 20, 50, or even just 100 records, I can...
I've set up a form to update my blog and it was working fine up until about this morning. It keeps on turning up with an Invalid Entry ID error on the edit post page when I click the update button despite the fact that it updates the homepage.
All help is seriously appreciated.
<html>
<head>
<title>Ultan's Blog | New Post</tit...
Hi I want to get the count of column called 'response'. But even though a user submits many responses I want it to be only considered as one. So basically I want to get the count of 'response' with DISTINCT user_id. How can I do this? Thank you.
...
Hello,
I have tables collating latin1_general_ci and have turkish character values. And i can use this data on delphi 7+zeos with no problem. but i want to upgrade my delphi to 2010 version but zeos too slow as i saw. so i want to use odbc+ado or dbexpress solution.
dbexpress solution works fine , display my data as entered and write ...
I have asked this once before but i didnt get a very clear answer.
I need to know how to make a rating script for a site. I have a form that submits a rating out of ten to mysql. How would you get the average rating to be displayed from the mysql column using php?
One person suggested having two tables; one for all the ratings, and one...
I'm creating a Rails application which uses MySQL. I have a table in my DB like this:
create_table "pastes", :force => true do |t|
t.string "title"
t.text "body"
t.string "syntax"
t.boolean "private"
t.datetime "expire"
t.string "password"
t.datetime "created_at"
t.datetime "updated_at"
end...