mysql

Ever Expanding Div to fit PHP/MySQL content.

I've created a blog main page using PHP and have included a sidebar and main area for the posts. When I add any more content to either the sidebar or the main content/posts area the content expands over the main div and the main div doesn't expand. How can I go about creating a div tag that will expand according to the content in the inn...

mysql group_concat order by utf8

Hi everyone! I have the following problem I have 3 table (all of the are used utf8 / utf8_general_ci encoding) movies, channels, i also have 3 table movie_channels which is just a combination of the other two with just 2 fields: movie_id,channel_id here is my channels table (code,name) '1', 'ОРТ' '2', 'ТК Спорт' '3', 'ТК ТНВ' '4', ...

Adapt code to my mySQL tables

I have a table, "jos_ezrealty" that has address, city, state fields and declat & declong for latitude and longitude. I need to adapt the code below (provided by google - http://code.google.com/apis/maps/articles/phpsqlgeocode.html) to work with my table. All of my address fields are filled, and half of my lat & long fields are filled. I ...

RoR scaffold add field after script/generate

I generated a scaffold and put in the type:value but now I need to add another field / db column how do I add another type:value without destroying and restarting my whole project? rake aborted! Mysql::Error: You have an error in your SQL syntax; check the manual that corres ponds to your MySQL server version for the right syntax to use...

MySQL select works in phpMyAdmin but my PHP returns no rows with the same call

Heres my code <?php session_start(); include('config.php'); if(isset($_GET['search_word'])) { // echo $_GET['search_word'] . '<br />'; // debugging $search_word = $_GET['search_word']; $search_word = mysql_escape_string($search_word); $search_word_fix = str_replace(" ","%",$search_word); $query = "SELECT * FROM art...

mysql php crud problem

Can anybody tell me why is the record not inserted? This is my one page :- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title></title> </head> <body> <form action="Adduser.php" method="post"> ...

Help with a MySQL Unix timestamp Query

I am trying to create a custom MySQL for use with the Expression Engine CMS. The purpose of the query is to display events that are happening today or in the future. The problem is that the EE field type that allows you to put in the date and converts it into a unix timestamp. If I pick the 26th July it puts in the date value "25th July...

MySQL Fetch Array doubt

Hi everybody, I´m fetching my database for images to create a gallery. Every row appear inside a <li>. My question is, is it possible, that the first <li> have a class (for example, "visible"), and all the other <li> have a class named "hidden". So the first $row would have a different class than the following... Hope I made myself clear...

Converting MySQL datetime to RSS pubDate using PHP?

i was wondering how would I convert datetime using PHP to work with RSS feeds pubDate? Why is my browser 3 hours off when displaying the time? Is there a way to correct this? ...

From where do i pass id to delete a record?

Hello, How do i pass id to delete record in this code? <form action="index.php"> <?php mysql_connect('localhost', 'root', ''); mysql_select_db('user'); $query = mysql_query("Select * from tbluser"); echo "<center>"; echo '<table style="border:solid 2px black;...

Query with multi tables

I have four tables: characters arena_team arena_table_member arena_team_stats. characters table has guid, name arena_team table has arenateamid, name, type arena_table_member table has guid(this is the same as in characters table), arenateamid arena_team_stats table has arenateamid, rating, wins, wins2, played How do I get the li...

Creating a Full Text Index search.

I've created a blog and I wish to search through certain tables in my MySQL databases and then return results for the user on a separate search page. I do not wish to use Google CSE. How would I go about creating this for my site. I found a post on StackOverflow.com from a friend of mine in which he wished to make his more efficient. How...

MySQL UNION with COUNT aliasing

I am trying to retrieve two counts from two separate tables into one SQL query to use with PHP. This is the current SQl query: SELECT COUNT(entryid) AS total FROM rh_entries UNION SELECT COUNT(pentryid) AS attended FROM rh_playerentries WHERE playerid=79 This is the PHP I am using to utilize the data: $result = mysql_query($query); $...

Undefinable problem with my Zend Framework based site

Hello everyone, Lately I had to reinstall my development site on my ubuntu machine since my system crashed after an os update. 4 days later my site is still not running as it should. Whenever i do an action which has in it an action on a database, it stops working. For example when Registring a new user, i get the following error: [...

Sqlite equivalent to MySQL's DESCRIBE [table]?

I'm just getting started learning Sqlite. It would be nice to be able to see the details for a table, like MySQL's DESCRIBE [table]. PRAGMA table_info [table] isn't good enough, as it only has basic information (for example, it doesn't show if a column is a field of some sort or not). Does Sqlite have a way to do this? ...

Custom Search Box to Search through MySQL Database

Possible Duplicate: Creating a Full Text Index search. I've created a blog and I wish to search through certain tables in my MySQL databases and then return results for the user on a separate search page. I do not wish to use Google CSE. How would I go about creating this for my site. I found a post on StackOverflow.com from a...

MySQL query select multiple column other table to be inserted in sub array

How to fix this mysql query SELECT no, name, (SELECT chapter, max FROM table2 WHERE name = user.name && max = 10) as sub_array1, (SELECT chapter, max FROM table2 WHERE name = user.name && max = 20) as sub_array2 FROM user ORDER by exp DESC example expected out result: I want the data to be: data->name data->no data->sub_array1->chapt...

How to Prevent Concurrent User Logins in PHP/MySQL Site?

Hi, I am developing the user management portion of a website that will host a webcast. The goal is to prrevent the same user nam (email address) from being used concurrently. That is, we don't want two individuals using one login to view the event. I've already setup a table that holds the user registration data with regID as prima...

is there an option on Ruby like mysql_insert_id() for PHP??

Hi Guys!! I would like to know if can be an option on Ruby like mysql_insert_id() for PHP. Thanks a lot ...

Retrieve data Mysql / Php where date

hey, I'm wondering how to retrieve data from my database using php to get the top songs today. Right now I'm just getting the top songs using $result = mysql_query("SELECT tag, COUNT(*) AS the_tags FROM tags GROUP BY tag ORDER BY the_tags DESC LIMIT 16"); I am also storing the date in the tags table aswell, in the format 07-25-201...