10,940 Topics

Member Avatar for
Member Avatar for veledrom

Hi, SQL below returns 1, 2, 3 in three rows. I want to see only 3 because there are total 3 records. How can I solve this problem. Thanks [CODE]SELECT COUNT(*) as totalProduct FROM customers INNER JOIN uploads ON customers.id = uploads.fk_id GROUP BY name[/CODE]

Member Avatar for veledrom
0
93
Member Avatar for joel123

Hi all, categories_id (PK,AI),categories_name(varchar(150)), categories_order(int), categories_image(varchar(100)), categories_status(int) This is my table structure. My server side language is PHP. User has to insert values to this table where categories_order(int) is optional. If the user miss categories_order(int) then it will be filled with zero. On select query, all rows must to sorted …

Member Avatar for pritaeas
0
71
Member Avatar for Davife

I'd like to trap mysql warnings and log them as part of my debugging process. However mySQL warnings just print to screen. I'd appreciate if someone knows how trap warnings along with whatever other information is available and prevent users from seeing the warning. Thanks. David

Member Avatar for NettSite
0
109
Member Avatar for bogdanxpose

Hi, I have a question about ajax, php si mysql.. In mysql i have a table playlists and here is the code for php: [code] <?php $playlist_result = mysql_query("SELECT *, COUNT(playlist_id) AS NumOccurrences FROM playlists WHERE created_by=$user_id GROUP BY playlist_id HAVING ( COUNT(playlist_id) > 0 ) ORDER BY date DESC"); …

Member Avatar for Airshow
0
76
Member Avatar for qk00002

I am new in VB.NET. Can any tell me how a[U] richtextbox [/U]query MySQL table. i.e select * from table test where name= 'Bowser' then the richtextbox will display the results. Thank you!

Member Avatar for kvprajapati
0
143
Member Avatar for wayne sd

In english: Retrieve current month's usage (using current date/month), retrieve previous month's usage (using previous date/month), subtract current - previous to get difference. table is water_records id, customer_id, water_records_date, water_records_usage 1, '1', '2010-02-01', '226600' 2, '1', '2010-01-01', '223000' 3, '4', '2010-01-05', '5600' 9, '4', '2010-02-19', '88000' 15, '5', '2010-02-15', '10060' …

Member Avatar for wayne sd
0
121
Member Avatar for luap599

Hi I have a mysql table name ( Discriptions ) that holds many normal text discriptions (doh'). How do I write a mysql query to search this table! Example: the description 'red paint': If I enter 'paint red! My query will not find it! Thanks for any help! Paul

Member Avatar for Simon Tite
0
92
Member Avatar for ismael ahm@d

Hello, i m new one in php/mysql, i m facing problem to calculate the two fields, in my database i have two fields the one is "debit" and second one is "credit"(and third one is (may be wrong) "Balance") Now i m wana to subtract "debit" from "credit" and then …

Member Avatar for darkagn
0
77
Member Avatar for Pece__

Hi there! I have one problem and I'm asking for some help :).I want to change font from one column to Unicode... is there some easy way to do that? :S

Member Avatar for luap599
0
84
Member Avatar for tchiky

Hello I would like to create a reference field. I would like it ti have a fixed number of charaters/numbers, just like the videos reference of YouTube. Is there a mysql/php function to handle that? I mean a function that generates a unique string that doesn't exist already in the …

Member Avatar for tchiky
0
164
Member Avatar for solarb

hi! I have a form to add content in database(addcontent.php) and one file which shows the content(content.php).Database has id,title,content columns. IS it possible to make the content.php to "$_GET" the id's from the database and show them on the page as : content.php?id=1 And other thing. i have buttons in …

Member Avatar for solarb
0
107
Member Avatar for pedroteixeira07

Hi Everyone, I'm having some issues in the construction of an algorithm for a project. This is just a fraction of the algorithm and my problem is this: I'm trying to build a PHP function that gets the values of the first and second rows of a table and subtract …

Member Avatar for diafol
0
135
Member Avatar for ChPravin

Hello all, I am trying to obtain data from a populated MySQL database table.Is there anyway to do so without specifying the connection string? I am using JDBC. The problem I am facing is that I don't have MySQL database on the system on which I need to run the …

Member Avatar for ChPravin
0
69
Member Avatar for nigelburrell

Hi, I trying select records where a field contains only one character of a string of characters. i.e. [code=sql]SELECT * FROM users WHERE user_role [contains any one character from...] 'ASD'[/code] so in this case, the query would return all records where the value of 'user_role' field is either 'A' or …

Member Avatar for ripraw
0
1K
Member Avatar for tones1986

Hi guys. I wanted to know if something would be possible. I currently have a server that runs mySQL and i created a database on there for use with PHP-Nuke Treasury module. I don't know much in the way of MySQL besides the basics. I uploaded the .sql file to …

Member Avatar for jaysmoke
0
153
Member Avatar for pavithraCS

Hi, Currently I have two colomns as frm_date and to_date. I need to display two dates in a one column as frm_date - to_date. eg: 2007-01-01 - 2009-01-01. Is there any functon to do this? Thanks in advance!!

Member Avatar for drjohn
0
70
Member Avatar for ripraw

Can you actually make relationships between tables in MySql??? i've looked all over the interent and all i can find is detail on what a relationship is pleeeeease help! am i barking up the wrong tree?

Member Avatar for drjohn
0
136
Member Avatar for justinmyoung

This is a dumb question, but I used MAMP and I don't know how to access my phpmyadmin. I used to have it on my localhost server, until I had to reinstall it with MAMP. Now I don't know how to access it? Thanks

Member Avatar for audioholic
0
96
Member Avatar for codeblock

Hello everybody, I've posted this question before but i got no help, may be i wasn't clear enough or it can't be solved but i really need someones help. The problem is my if else statement. My if else conditions will block the first two int values but then allow …

Member Avatar for codeblock
0
181
Member Avatar for samsons17

hi... i want to ask about joomla...I dont where else to ask but here... I hope you all can help me.. I've installed joomla 1.5 on my localhost which is Xammp... I also have created the mysql database through the free webhosting(zymic.com).. After i finish with the joomla installation,i wanted …

Member Avatar for deina
0
165
Member Avatar for kevindougans

For anyone still using the old "mysql_fetch_assoc" here is something I've just discovered today after about 9 years of PHP'ing and thought I should sahre because I've not seen many open source projects use it (maybe for another reason I'm not yet aware of)... (note: both provide the exact same …

Member Avatar for pbcomput
3
204
Member Avatar for jasystweb

I'm not quite sure how to do this join: Table1: Products -------------------------- Prod_ID | Prod_Name | etc Table2: Images --------------------------- IMG_ID | Prod Name | Prod_ID | [CODE] Select Prod_ID, Count(i_Prod_ID) from tblImages right join tblProducts on tblProducts.Prod_ID = tblImage.i_Prod_ID [/CODE] Does not produce what I need..... The desired end …

Member Avatar for jasystweb
0
148
Member Avatar for virtualmisc

Hello Friends If you were using an ssh client and wanted to find out the status of MySQL what would you look at? How would you know if MySQL was becoming overloaded? How would you know it was functioning properly? Thanks

0
70
Member Avatar for MickeyP123

In phpmyadmin and wanting to copy the mentioned rows below to within the same table. I am not copying the id so it is automatically incrementing. Why isnt it working??? Thanks in advance. INSERT INTO `table1` (title, alias, published, introtext, video, gallery, extra_fields, extra_fields_search, created, created_by, created_by_alias, checked_out, checked_out_time, modified, …

Member Avatar for MickeyP123
0
105
Member Avatar for mnavarro

Hello Everyone I'm trying to make a query that returns the name of the 'bundle owner' according to the bundle number. On the main table i have the bundle number in this format '676Z703009-1' and on the table that corresponds to the bundle owners we have the bundle number abbreviated …

Member Avatar for Maro18
0
151
Member Avatar for linux_mania

I want to make a programme for adding data in my my database(mysql).I did everything right and i can add,delete,change,get data using MySQLdb. My problem is when i want to add gui(Tkinter) i get error message.I googled and did everything to solve it but stucked.Please help me!!!!! my code is: …

0
55
Member Avatar for freshfitz

How do I set a variable in mysql database to equal txt so for example I have a table user-status which has values of 0 , 1, 2 or 3. I want a drop down to say if user_status = 3 display admin if user_status = 0 display no status …

Member Avatar for damnpoet
0
116
Member Avatar for karol33

Plzz help, all i have now is Warning: mysql_pconnect() [function.mysql-pconnect]: Lost connection to MySQL server at 'waiting for initial communication packet', system error: 95 in /home/plmzxsi/public_html/hull/Connections/stronaHull.php on line 9 Fatal error: Lost connection to MySQL server at 'waiting for initial communication packet', system error: 95 in /home/plmzxsi/public_html/hull/Connections/stronaHull.php on line 9 …

Member Avatar for karol33
0
113
Member Avatar for Aeterna

select * from a where a.b_id = $b_id and select count(*) from c where c.a_id = a.id and select count(*) from d where d.a_id = a.id whats the proper way to write this?

0
59
Member Avatar for jespin

Hi all, I have an issue with a PHP and MySQL deletion script where I am basically trying to delete all records for meetings which have expired. For this, on input, I have a date input calendar which inputs the date in the format 2010-01-18 to the database with the …

Member Avatar for jespin
0
188

The End.