mysql

mysql query error in php

Select COUNT(*) as num t1.id,t1.ads_city,t1.ads_title,t1.ads_description,t1.ads_location,t2.ads_date,t2.ads_image,t2.ads_id,t2.ads_time,t2.postads_id ,t2.ads_url FROM postads t1 JOIN nextpostads t2 ON t1.id = t2.postads_id WHERE t2.ads_activate="Yes" AND t1.ads_type="offerring" AND t1.ads_category="Learning & Education" ...

mysql stored procedures limit of lines/characters

Hi guys, once again I've run into a problem with mysql stored procedures. It's a tricky one and I'll stupply some teest data. Basically I have this load of text Operation Manna - Lancaster Series (7) The 29th April sees the anniversary of one of the most unusual RAF Lancaster operations in WW2. The Netherlands was deep in what became...

Working with products variations in ecommerce website

This is more of a "logic" question than a coding question. I am building this ecommerce site. Currently I am grouping products by: brand, category, subcategory1, subcategory2 and subcategory3. Just the standard way we are all used to work with. However, lets say we have something like this: iPhone 4 8GB ($US 199,49) iPhone 4 16GB ($US...

dynamically populating textfields in Flashbuilder

I'm trying to wrap my brain around getting data into my project in a way that I can use.. I want to use MySQL & PHP my Flashbuilder app and I'm not populating a datagrid so...... For simplicities sake, In my database table I have 3 columns "ID, Title & Content". I want to use this to populate the different states in my flashbuilder pr...

How to Deny Website Access based on User's Email Address

Good Morning, I'm starting a PHP/MySQL project that will include a registration page where the user will be prompted to enter their email address. The requirement is that certain email address domains will not be permitted access to the website. We want to disallow registration of such user's but not sure how to make this happen. O...

php and mysql connect issues on windows server / IIS6

Hello, I installed php and mysql on a Windows 2003 server running IIS6. I uncommented the lines for the mysql and mysqli extensions. I am able to run phpinfo, and am seeing the mysql and mysqli sections in phpinfo. I then run the following code to attempt a connection to the database - <?php $link = mysql_connect('localhost', 'root',...

how do I create a stored procedure from within a stored procedure

I would like to manage the deploy of stored procedures by first inserting them into a table, then, when it's time to deploy.... use a stored procedure to create all of the stored procedures. (Execute seems to be limited to CRUD) ...

Is it possible to share a set between two tables in MySQL?

I am currently in the process of designing a database. I have a table of 20,000+ records, which has a set in it (4 values). I also am making another table (100+ records) which will have an enum over the same set (1 value from the same set) Example of current: tbl1 tbl2 ID | Letters | Stuff ID | Le...

MySQL + Snow Leopard + 32 Bit + Ruby on Rails = uninitialized constant MysqlCompat::MysqlRes (HELP!)

So i'm running Snow Leopard on a BlackBook. I'm attempting to get rake db:migrate to work with this project but I get the MysqlCompat::MysqlRes error. Is there any special way to install or build the gem and/or the actual MySQL binaries themselves to get this to work on my machine? ...

MySQL Fulltext searching and minimum search term length.

I am using fulltext searching in mysql to search a database of videos I have, however when I search my videos some results will never get returned because the title I am searching for is less than the ft_min_word_len set in MySQL's settings. mysql_query("SELECT MATCH(videoDescription) AGAINST('".$searchString."' IN NATURAL LANGUAGE MODE...

Rails questions, SQL statement in logs

So I am new to Rails, so pardon the basic question. I see rails spits this out (in the console) for every request I make to my controller. Why? I'm not even doing any DB operation, I just started writing a HelloWorld rails app. I did pick mysql as the db when creating this rails project (rails -d mysql helloworld) SQL (0.1ms) SET NA...

Where can I find examples of code similar to how Remember the Milk uses the Twitter API?

I'm nearly finished building a simple web application that would really benefit from integration with Twitter through its API. I think the best way to do this would be through following and direct messages similar to how RTM has chosen to interact with users through Twitter. I learn best by analyzing examples, so I would like to find s...

How do i detect if a table exist? MySql

-edit- OMG Ponies answered this correctly. I cant accept his answer because for now it is just a comment. I was suggested to do this SELECT table_schema, table_name FROM information_schema.tables WHERE table_schema = 'mydb' AND table_name='ApprovePost'; However it is not reliable and cause me errors on several versions of mysql on wi...

Safari and iPhone Safari play as "live streaming" with finite file size (MySQL, PHP)

I read the following question and answer http://stackoverflow.com/questions/1995589/html5-audio-safari-live-broadcast-vs-not Still unclear how to resolve the issue in my situation: The audio files (mp3) I am working with are stored in mySQL and pulled into the browser by a PHP script that sends the Content-length and Content-type heade...

myssql foreign key whic is a composite key - what is the syntax?

Is it possible to have a composite key in mysql(5.1) and if so, what is the syntax? table a: column aa,bb references table b columns b_aa,b_bb ...

get us, uk in one table, cn and jp in the other, but not br in both

In countrylanguage, countrycode | language US | English BR | Portuguese UK | English in countryname, countrycode | name CN | China BR | Brazil JP | Japan "an inner join produces results by selecting combinations of matching rows from the joined tables. However, it cannot find non-matches" "A left join treats the ...

mySQL jar name and location

I wanted to know, What jars do I need to have to connect to MySQL, and Where can I download it? I googled it but there are so many of'em. Can somebody tell me what class DO I need to use.? Thanks ...

mysql query slow after upgrade

I don't know what our Systems team did to mysql. But one of my jsp pages takes about 15 seconds to load. It took only 1 second before upgrade. There are only about 200 entries in related tables. And the page connects about 60 times to the database. It is weird that such small page has this issue. Other JSP pages that query mysql have ...

Should I install 32-bit database or 64-bit database?

(I've read a lot about 64-bit versus 32-bit OS/Apps, but this question is specifically in regards to databases.) I'm trying to understand the pros and cons of 32-bit versus 64-bit databases, and namely, under what conditions that it starts to make sense to use 64-bit installations. The database systems that I am interested in are: SQL ...

mysql fulltext is there a way to select relevance as a column?

I would like to know if there is a way I can select the relevance score as a column? So I can store for later manipulation Also is there any way (for trouble shooting) to determine why a row got a relevance? or what words matched. For example when I use WITH QUERY EXPANSION I am getting results and I do not know why they match. ...