mysql

How to insert, edit, delete, show entries using Ajax for MYSQL?

Hi, I am trying to build a php/mysql website. But in the past, i didn't like the way php handled insert, update, delete, showing of entries. Ever since I have seen AJAX implemented beautifully on so many sites, i want to be able to do the same? I am familiar with how to use PHP to accomplish: DB Insert, Edit, Delete, and show. But ...

PHP: Search in one table and in another..

Hello. I am making an autosuggesting function, when the user writes something in the field it stores it in: $queryString = $db->real_escape_string($_POST['queryString']); I want it to autosuggest after the users friends. The user´s friends is in users_friends, but only the friend´s ID. Now their full_name is in the table "users". And ...

is there a mysql function to decode html entities?

i was wondering if there is a MYSQL function to decode text with html entities. I have seen some approaches using REPLACE but it looks kinda hard to manage all the entities. ...

MySQL: How can I remove trailing HTML from a field in the database ?

I want to remove some rogue HTML from a DB field that is supposed to contain a simple filename. Example of ok field: myfile.pdf Example of not ok field: myfile2.pdf<input type="hidden" id="gwProxy" />... Does anyone know a query I can run that can remove the HTML part but leave the filename? i.e. remove everything from the first < ...

Rails3 mysql2 rake error

hi, i'm running ruby 1.8.7 with rails3. after installing mysql2 (successful) I want to create the dbs, but the following error occurs: noname:addressDB clemens$ rake db:create (in /.../addressDB) rake aborted! undefined method `errno' for #<Mysql2::Error:0x1024f21f0> (See full trace by running task with --trace) noname:addressDB cleme...

documentation, pointers on TMyTable.Open in MyDAC

I am learning Devart's mydac Data Access Components and I have few question I have not been able to resolve through online searches and the documentations. In the code examples, I see invocation of TMyTable.Open but I could not find the description in TMyTable class or its inheritance path. I would like to as if anyone can point me to th...

upload BLOB file into MYSQL server: netbeans JAVAFX

im noob trying to store an avatar together with some details about a "user" into a mysql database then display them using netbeans JavaFX. i am able to display user details one at at time but i am unable to store and display an avatar together with the details. thanks in advance. ...

how to join two tables from separate db's with timestamps that differ slightly with sql

Hello all, I need to know how to join two tables together with their timestamps. The timestamps differ consistently by 1.8 seconds every time and there is a data entry every half hour. any ideas? ...

Database design question

I have a form where users submit different fields to create events. The number and type of fields requested are different on each form, depending on the category of event. What is the best way of going about designing this database - should the events contain every possible field and simply null the unused fields? Thanks! ...

Connecting Flash to PHPMyAdmin Database to DISPLAY Data

Hi All, I have a website in which the content on the index page is controlled by a PHPMyAdmin database. I want a a flash "movie" at the top, that can take the data from the site, and slide-show it until a user clicks on a specific link, in which the movie will direct itself to the clicked event. The page is for a booking/promotion conce...

Mysql table hanging - Unable to save result set in /home/my_site/public_html/my_file.php on line 149

I am getting the following error when trying to run a script from my site: Warning: mysql_query() [function.mysql-query]: Unable to save result set in /home/my_site/public_html/my_file.php on line 149 $run_sql = mysql_query("SELECT count(*) from tix_orders where order_id='$uniq_transaction_id'",$conn) I have tried analyzing and doing...

MySql upsert and auto-increment causes gaps

I've got a MySql table with an auto-increment primary key, and it seems that all of the various upsert methods (INSERT IGNORE and ON DUPLICATE KEY UPDATE) suffer from the, uh, feature that the auto-increment field increments, even if a row is updated and not inserted. This means that gaps are introduced into the table, which I find unde...

twitter like reply button using jquery and php get function?

i wanted to implemant the reply button so it takes a value through get function and put that in the update textbox just like twitter!! is thier a toturial or article, or you could guide me the right way i can do this!! ...

How to Use Facebook as my Sites Login?

Hey, I have some doubt, about FB Log in system integration in my website , how can i use it?? Like am i need to save anything in my db, more over how can i get a sample code in PHP? ...

Stuck with an SQL join query

I'm making a Q&A site, similar to this site and Yahoo answers. I have 3 tables - smf_members, qa_questions and qa_answers. In this query, I want to select some fields from qa_questions, a few fields from smf_members and the number of records in ga_answers for the question_id. This is so I can have some basic info on the question, some b...

Symfony / Propel - retrieving old dates from a database

This is regarding Symfony 1.4, and probably all prior versions, running php 5.3, mysql 5.1. If I store old dates in a database < 1970..., and I then retrieve them, they are automatically converted into an incorrect date. Example table: id, some_date 1, 1961-09-09 A quick example. $record = MyTablePeer::retrieveByPK(1); echo $record...

Exclude results from a MySQL UNION query

What is the proper way to exclude results from a MySQL UNION? I'm looking for the equivalent to: (query1) UNION (query2) UNION (query3) EXCEPT (query4) ...

One query per page - is it that bad?

I am creating RPG type game. I pull out player's information in every page loaded from two tables with JOIN (it is information about member: age, name, his all game's stats and etc) and sometimes this information is required for me, sometimes not at all. Two tables consists of ~60-70 rows. Here is an example: $query = mysql_query("SELEC...

mysql left join problem with SUM and WHERE clause

I have 2 tables in my database: item and category. Items can be active, or inactive, and have a categoryID that relates to the id of a record in the category table. i want to perform a query to show all the categories, with the total cost of active items for the category So my goal is to return something looking like this: +------...

Calling a Stored Procedure in Hibernate

I just started learning hibernate last night and its rather fun. I am some trouble calling a stored procedure as a sql-query with hibernate. I have attached the source and the error, please help me. Thanks :) <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "hibernate-...