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
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
298
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
218
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
121
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
183
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
139
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
187
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
180
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
119
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
234
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
136
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
222
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
142
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
212
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
142
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
146
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
127
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
105
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
116
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
120
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
151
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
142
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
240
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
353
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
149
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
153
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
112
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
105
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
154
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
188
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
193