When I run a query directly in MySQL using phpMyAdmin it allows – (long dash, not normal -), but when I run this query from my PHP code, it turns them to –.
If you encode – it'll come %E2%80%93 (in JavaScript). %E2 becomes â, %80 becomes € and %93 becomes “. I don't understand when I run the query in phpMyAdmin it shaves data as –, bu...
I want to make a query using which I can check that URL which I am making for a new video entry is not present in my db.
My current query is:
SELECT Count(videoid) FROM video WHERE titleurl = 'test';
I am storing count in a variable $n Then checking it using the following PHP code
if ($n > 0){
return $output . "-$n";
}else{
return...
Hi,
I need to retrieve data from a Parent > Child > Child relationship category setup. And I have no CLUE as to the proper SQL query syntax for that.
Help?
Thanks,
Tomer
...
hey
I want to delete some data from database:
WHERE created_at < NOW() - 30 min
How to wirte the 30 min into sql
...
What does the following mean when displayed on the screen?
And what are some solutions to correct it?
Column count doesn't match value count at row 1
Code I think is giving me a problem.
$query2 = "INSERT INTO question_tags (tag_id, users_questions_id) VALUES ('$id',(SELECT id FROM tags WHERE tag='" . $tags[$x] . "'), '$page')";
I...
If i have two users one users have many posts in post table i.e
postid, post, userid, time(i.e timestamp)
and I have another table for friends i.e
id, friendid, userid, friend_sinc(i.e timestamp)
Now I want that users friend should see the posts of user1 after the date on which he added the user1 as friend. Not the posts older than...
I need to know when mysql 5.4 stable is planned to be released, but cannot find any updated roadmap. Please help..
...
I have three tables (user, friends, posts) and two users (user1 and user2).
When user1 adds user2 as friend then user1 can see the posts of user2 just like on Facebook. But only the posts after the date when user1 added user2 as friend. My query is like this:
SELECT * FROM posts p JOIN friends f ON p.userid = f.friendid
AND s.time >= ...
Hello StackOverflow, my new friends!
I have a challenge I'm facing in my social networking app. The goal is to calculate the popularity of a user's "peers" - user's friends' friends.
I do this today no problem, but it's one of the more time/processor intensive operations, and I'm embarking on a new phase of business development which w...
This is my first time I use MySQL as datastorage for my C# Application, as I've seen that there is no UNIQUEIDENTIFIER type as in SQL server I decieded to use INT with AUTO_INCREMENT, my problem is now if I execute a INSERT, how may I get the ID of the Record I just added.
My quick and dirty solution has been to execute a SELECT MAX(ID)...
OK, I am creating a questionnaire application that is managed by a single user on /manage. There, he can create multiple questionnaires, each with a different name and set of settings(registered users, questions, data, etc.). Currently, the different tests are accessed by non-administrative users(the takers of the test) by going to /inde...
i have about 140 - 150 stored procedures that I need to migrate from MS SQL 2005 to MySQL 5.1
After succesfully porting 0 of them in the last eight hours I decied to drop by and ask if anyone has any experience, or tips, or knows some util app that can help.
MySQL Administrator is not very helpfull, with a frustrating "MySQL Error numb...
I have a large table (millions of rows) where I need to find groups of records based on the presence of a certain column value and where a specified 'timeout' has not occurred. I figure one approach would be to find across the entire table where these 'timeout' gaps have occurred.
Example table:
+----------------+------+
| time ...
I'm getting the following error when trying to connect to a MySQL database from ASP.NET.
System.DllNotFoundException: gda-2
at (wrapper managed-to-native) System.Data.OleDb.libgda:gda_init (string,string,int,string[])
at System.Data.OleDb.OleDbConnection.Open () [0x00000]
Can anyone help?
Thanks in advance
TAO
...
I cant not figure out why this script doesnt work. It has to do with something within the AJAX POST script/function. Right now, when I hit submit on my form it runs the php code on the same page. What it should do it is send the values of the form to project_ajax.php, then at page will return a var of success that will be true or false.
...
I'm trying to install the do_mysql on my Snow Leopord system Macbook Pro 13", but I keep getting this error:
n216-160:~ myself$ sudo gem1.9 install do_mysql
Password:
Building native extensions. This could take a while...
ERROR: Error installing do_mysql:
ERROR: Failed to build gem native extension.
/opt/local/bin/ruby1.9 extconf...
I am trying to use REPLACE to substitute spaces for commas.
If I try SELECT REPLACE('1 2 3 4 5 6 7 86 9', ' ', ', '); then I get exactly what I need in a string.
However, if I try this as part of an IN statement I only get returned the first match (ie, 1)
Here is my entire query:
SELECT aa.category_id,
aa.yyyymm,
...
PHP
mySQL
Hi, i am having an interesting problem.
I have a form in my cms that allows the admin to upload images to the server. The script resizes the images to a thumbnail (170px height)and a large image(600px height). The thumbnails are around 16000k in size and the large images are around 160,000k in size.
I do not set file permis...
Does OSX need an install of libmysqlclient15-dev? I'm trying to compile a gem that is failing and a lot of sources says to install "libmysqlclient15-dev" but I only see this for Linux, not OSX. Am I missing something here?
...
I am trying to insert date time on the MySQL DB. I have kept the field as VARCHAR(9182)
date_default_timezone_set('Asia/Kolkata');
$timestamp = date("m/d/Y h:i:s a", time());
$utimeprocess = "UPDATE tabelconf
SET time_of_pstart = '".mysql_escape_string($timestamp)."'
WHERE UniqueID = '".mysq...