Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+4
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
~10K People Reached
Favorite Tags

60 Posted Topics

Member Avatar for mpc123

I have a table of names that have done something on a certain date, now this could be over and over again yet of course on different dates but never the same. I need to update a field called last_time that corresponds to the previous date that they occur and …

Member Avatar for WebspoonUK
0
301
Member Avatar for mpc123

Hi I have a varible that is set at as a different value for each page this is called $mode. Currently I have succesfully set up a drop down menu that can filter the table and refresh the results based on that filter chosen, yet I need to call this …

Member Avatar for mpc123
0
227
Member Avatar for mpc123

Hi I need to look in a field to find the text same as another field I have this at the moment but it does not work, hoep you can help update TAB1, TAB2 set `field3` =`field4` where FIND_IN_SET('`FIELD1`', '`FIELD2`') I feel FIND_IN_SET is not the right thing as the …

Member Avatar for mpc123
0
123
Member Avatar for mpc123

Hi I need to delete words before a set of words in a field. eg delete the words before the word price in that field. I already have a query to replace a certain word but cant see how adapt it to do what I require update TABLE set `field` …

Member Avatar for diafol
0
188
Member Avatar for mpc123

So I have a single drop down menu populated from data base, now i want to get a bit snazzy and select from the first and from the selected then populate the 2nd drop down to select and then link to a url. Here is my code for first drop …

Member Avatar for diafol
0
151
Member Avatar for mpc123

I have this to make a file ... but the file created is only ever .php, it is like it is not echoing the field name. $newfile ="" . str_replace(' ','-',trim($file['title'])) . ".php"; and the next one i tried to echo out in the page came out blank too? <?php …

Member Avatar for mpc123
0
190
Member Avatar for mpc123

Hi I have changed some urls and know how to do a normal redirect but do not know where to start to be abale to redirect if part of the url contains certain words Example thisdomain.com/this/now-when/ would be redireted to thisdomain.com/this/an-other/ There is quite a few of them with the …

Member Avatar for cereal
0
182
Member Avatar for mpc123

Hi I need to update a colomn with the result of colomn 1 divided colomn2 I have tried update TABLE set colomn =SUM(colomn1 / colomn2) but get [Err] 1111 - Invalid use of group function IF anyone can help please

Member Avatar for mpc123
0
134
Member Avatar for mpc123

HI Hope somebody can help. My query updates a colomn in tab1 from a row in tab2 but only if a colomn in tab1 is equal to that of a row in tab2. tab 1 has 360000 rows tab 2 has 477 rows The update query runs for ages and …

Member Avatar for Ewald Horn
0
235
Member Avatar for mpc123

HI I have an else if statement that all the results are coming out as the first if even though in the info row they are different in the table, hope someone can help. // showbanners if($row['info'] ="Some Apples") { $showbanners = '<img src="1.png"><br><br><img src="2.png">'; } elseif($row['info'] ="Some Bananas") { …

Member Avatar for mpc123
0
142
Member Avatar for mpc123

Hi Im haveing a problem with ucwords and FINDINSET in a query I have tried all sortsof ways but just get errors I currently have and get FUNCTION ucwords does not exist. Can anybody help please $query = "SELECT * FROM TABLE1, TABLE2 WHERE FIND_IN_SET(ucwords(TABLE1.field), TABLE2.field)";

Member Avatar for mpc123
0
225
Member Avatar for mpc123

I have the following code but when $newstring echos out as '.-ucwords(strtolower(-['First.Name']))-.-'-'.-ucwords(strtolower(-['Last.Name']))-.-.php It should echo out the fields from the database noy just that code. If someone could help please $txtname = "'. ucwords(strtolower($row ['First.Name'])) . '-'. ucwords(strtolower($row ['Last.Name'])) . "; $newstring = str_replace(" ", "-", $txtname); while($row = mysql_fetch_array($result)) …

Member Avatar for mpc123
0
144
Member Avatar for mpc123

Hi I have an issue where by I have lots of products in a field which are comma delimited I want to replace those product words with a id number that I have in a different table. I currently use FIND INSET to replace a tab to the comma but …

Member Avatar for mpc123
0
216
Member Avatar for mpc123

HI Have a field in database which has multiple of the same number in, I have got a query of which works with the field with 1 in but then want it to then go to ++ so if I limit 9 results they will show with this query for …

Member Avatar for pritaeas
0
144
Member Avatar for mpc123

Hi im trying to random showing items from data base and when echoed the same ones appear? If anyone could help that would be great. This is the query SELECT * FROM TABLE1, TABLE2 WHERE FIND_IN_SET(TABLE2.FIELD1, TABLE1.FIELD1) and `FIELDNAME` >= RAND() LIMIT 10

Member Avatar for pritaeas
0
147
Member Avatar for mpc123

So I have this query but the error is wrong syntax around '%'$txt2',%' - what would I have to change this too please... thanks What I am looking for in the field is anything that has txt2, with things after it or just txt2 on its own without anything after …

Member Avatar for mpc123
0
128
Member Avatar for mpc123

Hi im using FIND iN SET in a query like below, but i get an error stating that im using wrong syntax and also Warning: mysql_fetch_array() expects parameter 1 to be resource $result = mysql_query("SELECT * FROM table FIND_IN_SET($txt2, field)") or trigger_error(mysql_error().$sql); Hope someone can help with this, thanks

Member Avatar for mpc123
0
106
Member Avatar for mpc123

Hi I have been using a replace array which has worked wonders but now I have just added one and it wont work why is this please. I can understand why it wont work but do not know what i have to do to sort it. I added the last …

Member Avatar for cereal
0
120
Member Avatar for mpc123

Hi I have this working for the query to output the result but the if zero results echo is not working, and I cnat see why, if anyone can help please, there is no error that comes up and to test there is nothing in the database table, it works …

Member Avatar for mpc123
0
121
Member Avatar for mpc123

Hi I am trying get a query to join 2 tables and a result on the information in both. At the moment I have the following $query = "SELECT * FROM TABLE1, TABLE2 Where 'TABLE2.field1' LIKE '%TABLE1.field2%'"; The problem is TABLE2 has a field with names in but TABLE1.field2 has …

Member Avatar for mpc123
0
155
Member Avatar for mpc123

Hi I am trying to get to download images into a file from database field urls onto my server as there is lots of them. I think im on the right track. I currently have an error Parse error: syntax error, unexpected T_STRING in getimages.php on line 11 Hope someone …

Member Avatar for mpc123
0
144
Member Avatar for mpc123

Hi Im trying to get mysql_query result with foreach set up and i am just planning what i am going to do but I am stuck with adding foreach into my code so far. Basically F field has several different options which are duplicated lots of times, so i need …

Member Avatar for mpc123
0
263
Member Avatar for mpc123

Hi Hope someone can help with this as I dont really know where to start. I am trying to automate a quite large txt feed I get from an external url to import into database. I currently do it manually through database software, but it takes too long each day. …

Member Avatar for mpc123
0
363
Member Avatar for mpc123

HI , I basically have made something that I require work in html but now trying to convert to get the results from data base but get this error and cant work out how to change it, if someone could help unexpected T_STRING, expecting ',' or ';' on line 69 …

Member Avatar for mpc123
0
152
Member Avatar for mpc123

Hi Hope someone can help with this. I have javascript set up how i want it in a normal html page but now need to ensure i can call a result using php with it. My code throws out an error The code states Parse error: syntax error, unexpected T_STRING, …

Member Avatar for mpc123
0
156
Member Avatar for mpc123

HI I am trying to create folders from database, but get this error as im trying to make folders named field1-field2-info Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING on line 8 <?php connection blar connection blar $query = "SELECT field1, field2 FROM Table"; $result = …

Member Avatar for broj1
0
116
Member Avatar for mpc123

HI Hope someone can help I have 2 sets of tabs on the page both are the same code and pointing to the same css, when the page loads everything is shos fine. But if you select one of the first set of tabs the first tab on the 2nd …

Member Avatar for AleMonteiro
0
106
Member Avatar for mpc123

Hi I am having an issue with a table join query whhich later I will echo results into a table. Example I have 2 x tables and Table1field1 has a number say 555 but table2field1 which I need to join to has 555 342 642 313 etc etc This is …

Member Avatar for veedeoo
0
157
Member Avatar for mpc123

HI I seem to have a problem with a drop down menu, the code seems to work fine and the values are showing in source code but do not show on the page???? Another issue is I dont know how to move forward after this to make a combo drop …

Member Avatar for AleMonteiro
0
191
Member Avatar for mpc123

Hi I have an issue whereby I need to replace characters in a field and also narrow the amount of characters down, but sturggling with putting them both together I have 2 seperate lines of code to do them both seperately that work, but struggling to get them together btw …

Member Avatar for mpc123
0
195
Member Avatar for mpc123

Hi I have variables set in the head of the page as they are used for other parts of the page. I have a problem where by I am trying to get the variable to echo out in the result. I have tried several ways but either ther eis an …

Member Avatar for AndreRet
0
115
Member Avatar for mpc123

Hi I have been struggling with this for a while and cant find the answer, the code below shows my else if statement everything goes fine until using the else if statement and ' . $img . ' ends up being blank. It should be if field 4 is 0.00 …

Member Avatar for mpc123
0
110
Member Avatar for mpc123

Hi I am trying to join tables and fields and one of the tables had fields like field.field . So when I try to do a join it does not know the table field name as you end up with something like Table1.field.Name How do I get round this please …

Member Avatar for mpc123
0
115
Member Avatar for mpc123

Hi I have to echo out some fields but "field 1" "field 2" "field 3" has a numeric value. I need to divide field 1 by field 2 and then take that result off of field 3 and echo that result. The code is part of a table this is …

Member Avatar for mpc123
0
175
Member Avatar for mpc123

Hi I am creating some files of which are taken from database fields, the problem is the field in the database has &pound; in which is great as it is needed when in the browser page. The problem I have is when making the file is that it creates the …

Member Avatar for mpc123
0
88
Member Avatar for mpc123

Hi hope you can help with this. Fields have spaces in the fields being echoed, how would I use the replace to change those spaces to a dash. 'Make' field will be something like blar blar blar and I need it to be blar-blar-blar <h4><a href="">'. $row['Make'].'</a></h4> Hope you can …

Member Avatar for LastMitch
0
159
Member Avatar for mpc123

Hi I am trying to echo this info with the different rows in the database but when I try the following code only the first result shows up. Please can someone help <?php $con = mysql_connect("localhost","blar","blar"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("blar", $con); $result = …

Member Avatar for LastMitch
0
209
Member Avatar for mpc123

Hi Im having a go at this, but not good on the php thing, thats why im hoping you can help. I am trying to set up a jump script from one I have used for 1 or 2 urls, now I have a database of around 500000 lines, each …

Member Avatar for mpc123
0
131
Member Avatar for mpc123

Hi If somebody can point me in the right direction for what i require that would be great. I will give an example rather than exactly what i require just to make it simplier to get the information across 1.I have a csv file which has around 400 rows in …

Member Avatar for mpc123
0
118
Member Avatar for mpc123

Hi I have 1.database already set up with around 5000 products with all fields required. 2. create a page template with query code and code to echo out the results of the fields of a product. I now need to know how to make each product from the database produce …

Member Avatar for nimtronican
0
138
Member Avatar for mpc123

Hi i have a form which also uses php to insert records into database, just name and address but also need them to pay via paypal, please help Form code [code=php]<form action="insert.php" method="post"> <div align="center">Firstname: <input type="text" name="firstname" /> Lastname: <input type="text" name="lastname" /> Email: <input type="text" name="email" /> <input …

Member Avatar for nonshatter
0
108
Member Avatar for mpc123

Im trying to get the queries and results to load quicker. I have 10 of these after each other with slightly different queries, how can i optimize this please, i have tried removing select * and entering the field names require (which is about 9 rather than the 40 with …

Member Avatar for pritaeas
0
140
Member Avatar for mpc123

I have a very large table and would need to split into lots of tables. The large table has lots of fields of which `Model.ID` gives a number of the product and this is repeated lots of times with other fields used in the row. I need to create lots …

Member Avatar for mpc123
0
92
Member Avatar for mpc123

I have a database which is quite large (around 1.7 million rows, with about 40 fields) . I want to do about 10 different queries and echo these results out in a tables that are spaced with headings for the seperate results, but i am worried about the length of …

Member Avatar for mpc123
0
119
Member Avatar for mpc123

HI my code has an error of - Unexpected character in input: ' in url/database.php on line 9 Parse error: syntax error, unexpected T_STRING in url/database.php on line 9 line 9 is $result = mysql_query($sql) or die(mysql_error()); Can anybody tell me what the problem is please [code=php]<?php require_once 'config.php'; $dbConn …

Member Avatar for qazplm114477
0
146
Member Avatar for mpc123

Im looking email members from a database where the emails are stored but also in a seperate table would be the information I want to send to them . I have this code of which i could use manually but 1. how do i get the multiple recipients to go …

Member Avatar for nonshatter
0
87
Member Avatar for mpc123

I have this very easy form to store info in a database table but i would like to be emailed once somebody has entered the details, how would i do this please? Form [code=php]<form action="insert.php" method="post"> <div align="center">Firstname: <input type="text" name="firstname" /> Lastname: <input type="text" name="lastname" /> Email: <input type="text" …

Member Avatar for mpc123
0
91
Member Avatar for mpc123

I have a news feature on a website and have a page that shows all of the news and a link to the actual page of each individual news. On first page that lists all the news i would like to limit the amount of Characters that is echoed from …

Member Avatar for P0lT10n
0
152
Member Avatar for mpc123

Hi im looking to echo a result of a query code i have at the moment is connections + [code=php] <?php $result = mysql_query("SELECT SUM(tablefield) FROM table") or die(mysql_error()); [/code] got no idea if this is right, i seem to have got really mixed up with this. Can anybody help …

Member Avatar for d5e5
0
113
Member Avatar for mpc123

Hi , hope you can help i have this code [code=php] <?php mysql_connect("localhost","x","x"); mysql_select_db("x"); $result = mysql_query("SELECT * FROM x") or die(mysql_error()); echo "<table class = feature >"; echo "<tr> <th></th> <th></th> <th></th> </tr>"; while($row = mysql_fetch_array( $result )) { echo "<tr><td>"; echo $row['Date']; echo "</td><td>"; echo $row['Title']; echo "</td><td>"; …

Member Avatar for mpc123
0
82

The End.