11 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for k_manimuthu

SAMPLE TABLE 1 =================================== product Division sales % =================================== product1 divsion1 99 product2 divsion1 51 product3 divsion1 50 product4 divsion2 98 product5 divsion2 41 product6 divsion2 40 product7 divsion3 97 product8 divsion3 31 product9 divsion3 30 =================================== Expected output 1 =================================== product2 divsion1 51 product3 divsion1 50 product5 divsion2 41 …

Member Avatar for diafol
0
550
Member Avatar for mexabet

I wrote a modify password file, but unfortunately, the MySQL query is throwing error: Warning: mysql_query() expects at most 2 parameters, 3 given in admin\modify-password.php on line 40 This is the PHP code: if (mysql_query("UPDATE admin SET hash = ? WHERE admin_id = ?", crypt($_POST["newpassword"]), $_SESSION["admin_id"]) === false) I modified …

Member Avatar for mexabet
0
344
Member Avatar for Lomholdt

Please help. I am trying to change data in my MySql database. I am able to input new data, but when i try to change anything, it doesn't work. Here is my code: <?php $id = $_REQUEST['id']; $newname = $_REQUEST['newname']; $newemail = $_REQUEST['newemail']; $newpassword = $_REQUEST['newpassword']; mysql_connect("localhost", "root", "") or …

Member Avatar for Lomholdt
0
141
Member Avatar for gk1993

$u = mysql_real_escape_string($_POST["username"]); $p = sha1($_POST["passwd"]); $q = "SELECT * FROM profile WHERE email=`$u` AND passwd=`$p`"; $run = mysql_query($q); if(!$run){ echo mysql_error(); } this creates *Unknown column 'mymail@gmail.com' in 'where clause'* error. This code is from a tutorial and a piece of a submit-new-post php page.

Member Avatar for gk1993
0
156
Member Avatar for Anark10n

#include <stdio.h> #include <mysql.h> #include <string.h> int main(int argc, char **argv) { MYSQL *conn; MYSQL_RES *result; MYSQL_ROW row; int num_fields; int i; char user_query[100]; char word[10]; printf("Enter word: "); scanf("%s", word); sprintf(user_query, "select * from english where word = %s", word); printf("%s\n", user_query); conn = mysql_init(NULL); mysql_real_connect(conn, "localhost", "root", "123", …

Member Avatar for Anark10n
0
146
Member Avatar for sammry

lastlogin is getting saved as time() in my mysql table and it is varchar mode. querying the database to send out emails to remind my users that they have not logged in from past 30 days SELECT * FROM members WHERE lastlogin = DATE_SUB(CURDATE(), INTERVAL 30 DAY) i tried with …

Member Avatar for sammry
0
171
Member Avatar for kyklops

Hi everyone, I'm new to mySQL. I have a table like this one: [ICODE]+-------+-------+-------+ | date | plant | value | +-------+-------+-------+ | date1 | 1 | 10 | | date2 | 1 | 12 | | date3 | 1 | 15 | | date4 | 2 | 30 | …

Member Avatar for smantscheff
0
203
Member Avatar for naeemnur

Hi, All i want to show is the 'fr_players' to have two categories of 'fr_nations' and 'fr_clubs' and fetch the names from the foreign id... Here what i have done so far but it doesnt shows any error or return any tables either: [CODE]SELECT a.id as club_id, a.fr_name as club_name, …

Member Avatar for naeemnur
0
983
Member Avatar for Sabyre

I'm working on an auction script for a client. This portion of the script pulls all the open auctions from the database and allows bidding, but they only want bidding on auction with 30 seconds left until it ends. [CODE] $query = "select * from DSI_auctions WHERE closed='0' AND suspended='0' …

Member Avatar for pritaeas
0
131
Member Avatar for designalex

Please correct my syntax: im including a file with the following constants [CODE] define('IPADDRESS', $_SERVER['REMOTE_ADDR'] ); define('BROWSER', @$HTTP_USER_AGENT ); define('REFERER', @$HTTP_REFERER ); [/CODE] if i echo IPADDRESS; i get the ip address (127.0.2) so the include is fine. My mysql instruction is as follows: [CODE] $update = mysql_query("UPDATE login_errors SET …

Member Avatar for designalex
0
179
Member Avatar for doctorphp

Hi everyone I am trying to develop a friend system where you can view friends who you are friends with. I have been able to get it to show one result but it wont show any other. Please can someone tell me what I am doing wrong. Here is the …

Member Avatar for doctorphp
0
148

The End.