10,940 Topics
| |
hi friends I am developing a osCommerce website and I am strucking with displaying items. Ok Ill explain what my issue in my site ok I am using a sql query to display all the product in database. ok this is my query [CODE]$products_new_query_raw = "select * from " . … | |
Hi, Assume, I have a following table whose schema is, create table testing (test1 integer not null, test2 integer not null, test3 integer not null, test4 integer not null); And assume the following details are inserted: insert into testing values (1,1,0,0); insert into testing values (1,1,1,0); insert into testing values … | |
Hi, I'm designing a web page that has 6 drop down html form inputs (d, m, y, d, m, y) for pulling records from a mysql database depending on users input of a range of dates. I'm trying to use an Ajax script that will hopefully, on submit of form, … | |
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] | |
Hello I have another problem. Here is previous thread: [url]http://www.daniweb.com/forums/post1237196.html#post1237196[/url] and my code: [CODE]$tipster = mysql_query("SELECT SUM(Analysis.Profit), Users.id, Users.Country_name, Users.Username, User_status.id_status FROM Users INNER JOIN User_status ON Users.User_status_name=User_status.user_status left outer JOIN Analysis ON Users.Username=Analysis.Tipster WHERE User_status.id_status>=3 GROUP BY Tipster ORDER BY SUM(Analysis.Profit) DESC"); while ($row = mysql_fetch_array($tipster)) { $sel_tipster=$row['Username']; echo … | |
Hey guys, need your help here. How best can i Normaliza the sql query below [CODE]#---------------------------- # Table structure for litorder #---------------------------- CREATE TABLE `litorder` ( `id` int(10) NOT NULL auto_increment, `name` varchar(50) NOT NULL default '', `address` varchar(50) NOT NULL default '', `xdate` date NOT NULL default '0000-00-00', `ref` … | |
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 … | |
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 … | |
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 … | |
How to Rename stored procedures in PL/SQL Is there any query for that? | |
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 … | |
I just wanna ask whats the difference between trim() and mysql_real_escape_string() functions? because i see this code below : [CODE] $username = trim(mysql_prep($_POST['username'])); $password = trim(mysql_prep($_POST['password'])); [/CODE] and myql_prep is a function being made thats contain this : [CODE] function mysql_prep( $value ) { $magic_quotes_active = get_magic_quotes_gpc(); $new_enough_php = function_exists( … | |
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] … | |
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 … | |
greetings.. i'm newbie on php and mysql.. i need help on how to create search form that return the results related to it? i'm using php mysql.. thus, i need help on how to make each result that'll be as a link to all data in it's row.. thank you! | |
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 … | |
I have one problem with php and mysql. I have 3 tables (Users, User_status and Analysis) and want to display users and profit in a php table order by profit. So I wrote this code: [CODE]$tipster = mysql_query("SELECT Analysis.Profit, Users.Username, User_status.id FROM Analysis, Users INNER JOIN User.status ON Users.User_status_name=User_status.user_status WHERE … | |
Hai, I am using MySQL table to store session values. i am getting sid as 'deleted' for some sessions in live server . but i am not able to simulate it in development server . what scenario it will occur. sample data. +---------+-------+-------------+ | sid | value | expire_time | … | |
Hi I am trying to write a script that puts a Horizontal Line between MySQL query results but doesn't show up after the last row. eg: First Line ---------------- Second Line ---------------- Third Line I'm using PHP, MySQL and JavaScript AJAX. Don't know if that's relevant for this instance or … | |
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 | |
I am trying to make a function that gets the name of a user from their user id. The function needs to search a database for the matching id. However, when I try the function i get the following error: [B]Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, null given … | |
[CODE] $result = mysql_query(" SELECT q.*, IF(v.id,1,0) AS voted FROM quotes AS q LEFT JOIN quotes_votes AS v ON q.id = v.qid AND v.ip =".$ip." AND v.date_submit = '".$today."' "); $i=1; $str=''; $script=''; while($row=mysql_fetch_assoc($result)) { // Looping through all the quotes and generating the list on the right of the … | |
Sorry I think I posted it on the Wrong Forum, Please Delete this Post... :( [CODE] $result = mysql_query(" SELECT q.*, IF(v.id,1,0) AS voted FROM quotes AS q LEFT JOIN quotes_votes AS v ON q.id = v.qid AND v.ip =".$ip." AND v.date_submit = '".$today."' "); $i=1; $str=''; $script=''; while($row=mysql_fetch_assoc($result)) { … | |
I need to submit a project in vb & sql I have a project in vb & access which I have to convert to vb & sql secondly I have basic idea of sql data connection. but unfortunately I have done my sql class long back & lost the notes … | |
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 … | |
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 … | |
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 * * … | |
linking database selected through dropdownlist with corresponding database in mysql via php | |
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 … |
The End.