7,368 Topics

Member Avatar for
Member Avatar for toasty525

Hi, can anyone tell me why the below PHP code keeps returning mysql_num_rows(): supplied argument is not a valid MySQL result resource ?? [code=php] $result = mysql_query("SELECT * FROM RewardGenUser WHERE UserID = 123"); $num = mysql_num_rows($result); [/code]

Member Avatar for rajarajan2017
0
81
Member Avatar for farukdeni
Member Avatar for sampath naik

my leave table: Field | Type | Null | Key empID int(11) NO EMPDETID int(11) NO Leave_ID int(11) NO LEAVEDATE datetime NO FIRSTHALF tinyint(3) unsigned NO SECONDHALF tinyint(3) unsigned NO REQPENDING tinyint(4) YES APPROVED tinyint(4) YES REJECT tinyint(4) YES my lev_definition table: Field Type Null Key LEVID int(11) NO PRI …

Member Avatar for tyson.crouch
0
104
Member Avatar for vista

Hi there. Okay heres the scenario. I have 2 tables "Logins" and "User_Details" What I want to do is write a PHP query that whenever a new user is created, that is manually entered into "User_details" table using a form, the next thing that should happen is that it should …

Member Avatar for vista
0
146
Member Avatar for davidjennings

Hi, I have a dropdown box extracted from MySQL database and I have two records for a product as it was produced in different years. i.e. model number 75 repeated, I am trying to extract only one of them in the dropdown box and have used select distinct but it …

Member Avatar for davidjennings
0
115
Member Avatar for Yathini
Member Avatar for rajarajan2017
0
138
Member Avatar for fizanos

I need your help!!!. I need to query a table in my database that has record of goods sold. I want the query to detect a particular product and also calculate the quantity sold. The product are 300 now, but it would increase in the future. Below is a sample …

Member Avatar for rajarajan2017
0
117
Member Avatar for tyson.crouch

G'day, I've got my SCMA tomorrow morning, and I thought i would post up my notes. These notes are intended as a general tutorial/guide for MySQL. [B]It covers the following topics:[/B] [B]Section 1: Theory, Terminology and Concepts (10%)[/B] [LIST] [*]Client/Server Concepts [/LIST] [B]Section 2: Data Definition using SQL (25%)[/B] [LIST] …

Member Avatar for rajarajan2017
2
223
Member Avatar for mitchems

Hi all, I was wondering if any of you have had any experience with Catalyst and Moose. I am starting a project that I think would use both. I plan to use mod_perl or fast_cgi with Catalyst as the framework and Mason as the template language (I have used Mason …

0
104
Member Avatar for bsewell

Hi everyone, I'm trying to write some PHP code to update a user's password. It is not updating and I can't spot what's wrong with my query (I have echo'ed it to the screen). [CODE]$sql="UPDATE $tbl_name set 'password'='$new_password' WHERE 'user'=$user;"; $result=mysql_query($sql);[/CODE] SQL statement [QUOTE]UPDATE user set 'password'='2' WHERE 'user'=test;[/QUOTE] What's …

Member Avatar for urtrivedi
0
77
Member Avatar for tyson.crouch

G'day, Just a simple question. Does MySQL Support Inheritance? I understand that both Oracle and PostgreSQL support Inheritance, but haven't seen anything in MySQL regarding this. Regards, TC

Member Avatar for griswolf
0
119
Member Avatar for Ole Raptor

I am having issues with the following script. I don't see anything wrong here. Very basic but it is giving me a headache. Any suggestions are welcome. I am running version 5.1.37 and the error is: Error Code : 1064 You have an error in your SQL syntax; check the …

Member Avatar for griswolf
0
952
Member Avatar for Cobber

Hi, I don't know if this is the right forum to post this, if not please move it or just delete it. I installed Phpauction via Fantastico after trying several purchased scripts that just wouldn't work. Everything is working fine except the "View Feedback" links which give the following error …

Member Avatar for pcfix609
0
180
Member Avatar for whitestream6

This is my pagination script: [CODE] <?php /*********************************** * PhpMyCoder Paginator * * Created By PhpMyCoder * * 2010 PhpMyCoder * * ------------------------------- * * You may use this code as long * * as this notice stays intact and * * the proper credit is given to * * …

Member Avatar for Monster Killer
0
73
Member Avatar for robynne

Good afternoon. I was hoping to get some query optimization tips. I am writing a php script to retrieve data from a mySQL database. Table A, which contains most of the fields that I need, contains just under 11,000 rows. Table B, which contains 3 fields that I need, contains …

Member Avatar for tyson.crouch
0
149
Member Avatar for SenTnel

Hello! I need your help again... thanks! I have a table where I need to insert the same value in all rows and dont know how to. Table: equipment, Column: available How can I enter a number 1 in column "available" in all rows? Thanks again!

Member Avatar for finito
0
77
Member Avatar for YuriyHorobey

Hi all, thanks for reading my post ) My name is Yuriy Horobey, I am developing web for more than 10 years. There are some same geeks like me arround me, so I am forming my company, registering it and searching for partners. What do we offer? -- Full cycle …

Member Avatar for YuriyHorobey
0
273
Member Avatar for Keidi

Hi all I'm trying to learn php by myself I got as far as creating my first data base and table using the following code: [code=php]$con = mysql_connect("localhost","root",""); if (!$con) { die('Could not conect: '.mysql_error()); } //Create database if (mysql_query("CREATE DATABASE FATBYTES",$con)) { echo "Database created"; } else { echo …

Member Avatar for scaiferw
0
197
Member Avatar for viscorus2004

Hy sorry for my bad english I have transaksi_pembayaran table and have a tgl_tran field, tgl_tran is a date but has type varchar, how can I get date range in mysql? date range like this : 14/2/2005 to 27/2/2005 (d/m/y)

Member Avatar for tyson.crouch
0
115
Member Avatar for andydeans

Hi, I have tested this and get no errors. However when i am updating a mortgage record for a client it changes the client id?? So if i am updating a mortgage for clientid = 1 Test Case and Mortgage ID = 1 once i click update in my php …

Member Avatar for andydeans
0
115
Member Avatar for charvie

Hi, I have page that allows the user to search using a "date range" AND "location". I'm able to do this individually. Its like, if the user searches using the date range (from begin date to end date) the results show. Then if the user searches using a specific location …

Member Avatar for tyson.crouch
0
87
Member Avatar for neti1987

hi! I have a table which contain files paths. my problem is, that when I insert a path, MySQL omit the separator char. for example: INSERT INTO A VALUES ('C:\qqq\www\eee.ttt'); will be saved in A as: C:qqqwwweee.ttt what can I do for saving the path as it is? (ofcourse, I …

Member Avatar for tyson.crouch
0
158
Member Avatar for tyson.crouch

G'day, I've got a table [CODE]CREATE TABLE IF NOT EXISTS `attractions` ( `attID` int(11) NOT NULL AUTO_INCREMENT, `attName` varchar(255) NOT NULL, `adultPrice` double NOT NULL, `childPrice` double NOT NULL, `referenceID` varchar(255), PRIMARY KEY (`attID`), KEY (`attName`) ) ENGINE=InnoDB;[/CODE] Now my initial set up was that [B]referenceID[/B] was linked to [B]attID[/B] …

Member Avatar for tyson.crouch
0
102
Member Avatar for kischi

Hi, i'm trying to setup a connection in dreamweaver. so now I have the diologbox open with the different fields I have to write in. First no problem with the: connection name, mysql server, user name and database fields. But when I get to the field password, I don't really …

Member Avatar for tyson.crouch
0
85
Member Avatar for SenTnel

I need to merge to identical tables, but one column (areas_sub_local_obj) has a reference to the Id column (Primary Key). I need a script to insert the data from table 1 into table two and to change the value in the column areas_sub_local_obj to the new Id that corresponds to …

Member Avatar for SenTnel
0
138
Member Avatar for Charls Frdinand

Hello everyone! This is my first post, been a long time reader though. First of all, it's been a while since I don't program and I'm rusty (very). The problem is: I just can't learn how to use the JOIN or UNION commands, everything I read is confusing. I'm simply …

Member Avatar for Charls Frdinand
0
236
Member Avatar for Onisutra

So I went to mysql docs to check out if they had info on what to do. I found this [QUOTE] “[0-9]*” matches any number of digits, and “.*” matches any number of anything.[/QUOTE] So, I tried them both out & have no result that back back. The query I …

Member Avatar for drjohn
0
117
Member Avatar for Lapixx

Hi, I'm creating a simple analytics script to use on my website(s). I started of very simply by just creating a new record for every session, and updating the sessions (i.e. incrementing the number of pageloads for that session) when a new page is loaded. I also save the browser/version …

Member Avatar for Lapixx
0
457
Member Avatar for neti1987

hi! I hope this is the place for my my question: I work on a file tagging system. I write it in java and use MySQL as my DB. I have a table that contain only one field: file's path. when directory is renamed, it's path changes. and that's mean, …

Member Avatar for neti1987
0
241
Member Avatar for vs.vaidyanathan

hi, Is there any sql query to check if a table exists already in a database? Thanks in advance.:)

Member Avatar for vs.vaidyanathan
0
625

The End.